dzintars / infra

Roles and various notes to set up my workstation. WIP. Some of the content can be out of date and incorrect.
2 stars 0 forks source link

Podman: Error: error starting some containers: some containers failed #30

Open dzintars opened 3 years ago

dzintars commented 3 years ago

After some mysterious system tweaks i can't run containers with Podman. Nor in user-space nor as root. It returns

Error: error starting some containers: some containers failed

To investigate the issue i try to run single created container:

podman start my-container-name

Result is:

Error: OCI runtime error: unable to start container "0e77101d474a8c65db0c485ee4a08de3471e84e5737016a7b6ed5a85cb26f2ba": container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: process_linux.go:422: setting cgroup config for procHooks process caused: cannot set memory limit: container could not join or create cgroup

Much better as now i have some clues. Let's check the cgroup version

podman info | grep cgroup

And the result seems leads to the root of the issue above.

  cgroupManager: cgroupfs
  cgroupVersion: v1

This means, that at some point i had switched to the cGroup v1. But i don't remember why i did that.

dzintars commented 3 years ago

Ok.... i think the reason was because i fixed some Libvirt issues and added systemd.unified_cgroup_hierarchy=0 to the GRUB_CMDLINE_LINUX

If i will remove it virt-host-validate then will return warnings which i should solve.

dzintars commented 3 years ago

Removed that grub parameter from

» sudo nvim /etc/sysconfig/grub
» sudo grub2-mkconfig -o /boot/grub2/grub.cfg
» sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
» reboot

Now lets check

» grep cgroup /proc/filesystems
nodev   cgroup
nodev   cgroup2

Seems booth cgroup versions are supported. But » podman info | grep cgroup still returns

  cgroupManager: cgroupfs
  cgroupVersion: v1
dzintars commented 3 years ago

Will try to set systemd.unified_cgroup_hierarchy=1 OK, this seems worked but with some other issues

ERRO[0000] Error creating CGroup for pod 4f0e7eaa3b8921566482a5c8ecada82e399df8257c0d251fd5f388462afd305d: cannot assemble cgroup path with base "/libpod_parent" - must end in .slice: invalid argument
  cgroupManager: systemd
  cgroupVersion: v2

Remove all pods and containers. Then run

» podman start my-container-name
Error: OCI runtime error: unable to start container "6281d39a97fe1149bd079e8b5f1a134669414cc4afdbc663548387cbaeb1eaa6": writing file `cpu.max`: Invalid argument