Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run cri-o 1.20 on Ubuntu 18.04 #4574

Closed
Drakkai opened this issue Feb 14, 2021 · 13 comments
Closed

Failed to run cri-o 1.20 on Ubuntu 18.04 #4574

Drakkai opened this issue Feb 14, 2021 · 13 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. packaging ubuntu

Comments

@Drakkai
Copy link

Drakkai commented Feb 14, 2021

Description

I tried to install kubernetes 1.20.2 using kubespray based on cri-o and Ubuntu 18.04. Unfortunately, the installation ended with an error starting crio.service. So I tried to install cri-o on a fresh system, but without success - I am not able to run cri-o version 1.20 on Ubuntu 18.04. I installed it according to the instructions on the website https://cri-o.io/. I get the same error for version 1.19.

root@test:~# systemctl start crio
Job for crio.service failed because the control process exited with error code.
See "systemctl status crio.service" and "journalctl -xe" for details.
root@test:~# journalctl -u crio
-- Logs begin at Sun 2021-02-14 15:00:46 CET, end at Sun 2021-02-14 15:02:52 CET. --
Feb 14 15:02:16 test systemd[1]: Starting Container Runtime Interface for OCI (CRI-O)...
Feb 14 15:02:16 test crio[2605]: time="2021-02-14T15:02:16+01:00" level=info msg="Starting CRI-O, version: 1.20.0, git: d388528dbed26b93c5bc1c89623607a1e597aa57(clean)"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.134115020+01:00" level=info msg="Node configuration value for hugetlb cgroup is true"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.134200522+01:00" level=info msg="Node configuration value for pid cgroup is true"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.134305024+01:00" level=error msg="Node configuration validation for memoryswap cgroup failed: node not configured with memory swap"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.134459526+01:00" level=info msg="Node configuration value for memoryswap cgroup is false"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.135773751+01:00" level=info msg="Node configuration value for systemd CollectMode is true"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.187879808+01:00" level=info msg="Overlay test mount did not indicate whether or not metacopy is being used: failed to mount overlay for metacopy check with \"nodev,metacopy=on\" options: invalid argument"
Feb 14 15:02:16 test crio[2605]: time="2021-02-14 15:02:16.188078612+01:00" level=fatal msg="Validating root config: failed to get store to set defaults: failed to mount overlay for metacopy check with \"nodev,metacopy=on\" options: invalid argument"
Feb 14 15:02:16 test systemd[1]: crio.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 15:02:16 test systemd[1]: crio.service: Failed with result 'exit-code'.
Feb 14 15:02:16 test systemd[1]: Failed to start Container Runtime Interface for OCI (CRI-O).

Steps to reproduce the issue:

  1. Install Ubuntu 18.04
  2. Add repositories and keys
  3. Install cri-o and cri-o-runc
  4. Reload systemd
  5. Failed to start crio.service

Describe the results you received:
Validating root config: failed to get store to set defaults: failed to mount overlay for metacopy check with \"nodev,metacopy=on\" options: invalid argument

Describe the results you expected:
Run crio.service without problem.

Additional information you deem important (e.g. issue happens only occasionally):

Output of crio --version:

INFO[0000] Starting CRI-O, version: 1.20.0, git: d388528dbed26b93c5bc1c89623607a1e597aa57(clean)
crio version 1.20.0
Version:       1.20.0
GitCommit:     d388528dbed26b93c5bc1c89623607a1e597aa57
GitTreeState:  clean
BuildDate:     2020-12-16T11:12:35Z
GoVersion:     go1.15.2
Compiler:      gc
Platform:      linux/amd64
Linkmode:      dynamic

Additional environment details (AWS, VirtualBox, physical, etc.):
Ubuntu 18.04 on Hyper-V

root@test:~# uname -a
Linux test 4.15.0-135-generic #139-Ubuntu SMP Mon Jan 18 17:38:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@test:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic
@haircommander
Copy link
Member

can you try to run
sed -i 's/,metacopy=on//g' /etc/containers/storage.conf and see if that works? It seems ubuntu 18.04 doesn't support the option

@Drakkai
Copy link
Author

Drakkai commented Feb 15, 2021

Thanks, it works. Maybe it should be mentioned in the documentation?

root@test:~# sed -i 's/,metacopy=on//g' /etc/containers/storage.conf
root@test:~# systemctl status crio
● crio.service - Container Runtime Interface for OCI (CRI-O)
   Loaded: loaded (/usr/lib/systemd/system/crio.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: https://github.com/cri-o/cri-o
root@test:~# systemctl start crio
root@test:~# systemctl status crio
● crio.service - Container Runtime Interface for OCI (CRI-O)
   Loaded: loaded (/usr/lib/systemd/system/crio.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-02-15 18:19:21 CET; 2s ago
     Docs: https://github.com/cri-o/cri-o
 Main PID: 2705 (crio)
    Tasks: 8
   CGroup: /system.slice/crio.service
           └─2705 /usr/bin/crio

@haircommander
Copy link
Member

we should really fix this in the package itself, it isn't too hard to auto-detect, and not worth end-user time/energy :)

@haircommander
Copy link
Member

thanks for the report @Drakkai

@champtar
Copy link

An easy rule would be kernel >= 4.19 or kernel = 4.18.0 (EL 8.x)

@champtar
Copy link

One of the painful part is that ubuntu (18.04) has different kernel versions in the cloud than in normal images.
Cleanest way to fix this is to use today failing check and turn that into an autodetection rule, so this also handle custom kernel

@avoidik
Copy link

avoidik commented Apr 2, 2021

we should really fix this in the package itself, it isn't too hard to auto-detect, and not worth end-user time/energy :)

on the other hand, you can of course keep it for some nameless poor soul to learn about how to troubleshoot low level storage issues between CRI and Kubernetes API :)

@haircommander
Copy link
Member

it's all a learning experience 😄

@danilutkin
Copy link

thank you for this experience )

facebook-github-bot pushed a commit to terragraph/tgnms that referenced this issue Aug 17, 2021
Summary:
metacopy breaks cri-o ubuntu 18.04 with the current releases. I'm not really sure what's wrong there but it's not possible to even create a pod with this setting enabled and current releases of cri-o.

The following github issues describe the issue:
cri-o/cri-o#5104
cri-o/cri-o#4574

Differential Revision: D29924175

fbshipit-source-id: b5c0375098766df8c5b71a9fe106fdd1d6133575
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 29, 2022
@haircommander
Copy link
Member

I think autodetecting ended up being more tricky than expected

@haircommander haircommander removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 30, 2022
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 31, 2022
@github-actions
Copy link

Closing this issue since it had no activity in the past 90 days.

@github-actions github-actions bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 30, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. packaging ubuntu
Projects
None yet
Development

No branches or pull requests

5 participants