Hi all, I've come across an issue when restarting a systemd container, which I'm seeing on a CentOS 8.2 VM but not able to reproduce on an Ubuntu 20.04 VM (both cgroups v1).
The failure looks as follows, hitting the warning condition at https://github.com/systemd/systemd/blob/v245/src/shared/cgroup-setup.c#L279: [root@localhost ubuntu-systemd]# podman run -it --privileged --name ubuntu --detach ubuntu-systemd 5e4ab2a36681c092f4ef937cf03b25a8d3d7b2fa530559bf4dac4079c84d0313 [root@localhost ubuntu-systemd]# podman restart ubuntu 5e4ab2a36681c092f4ef937cf03b25a8d3d7b2fa530559bf4dac4079c84d0313 [root@localhost ubuntu-systemd]# podman logs ubuntu | grep -B6 -A2 'Set hostname' systemd 245.4-4ubuntu3.19 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid) Detected virtualization podman. Detected architecture x86-64. Welcome to Ubuntu 20.04.5 LTS! Set hostname to <5e4ab2a36681>. [ OK ] Created slice system-getty.slice. [ OK ] Created slice system-modprobe.slice. -- systemd 245.4-4ubuntu3.19 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid) Detected virtualization podman. Detected architecture x86-64. Welcome to Ubuntu 20.04.5 LTS! Set hostname to <5e4ab2a36681>. *Failed to attach 1 to compat systemd cgroup /machine.slice/libpod-5e4ab2a36681c092f4ef937cf03b25a8d3d7b2fa530559bf4dac4079c84d0313.scope/init.scope: No such file or directory*[ OK ] Created slice system-getty.slice. If using docker instead of podman (still on CentOS 8.2) the container actually exits after restart (when hitting the code at https://github.com/systemd/systemd/blob/v245/src/core/cgroup.c#L2972): [root@localhost ubuntu-systemd]# docker logs ubuntu | grep -C5 'Set hostname' Detected virtualization docker. Detected architecture x86-64. Welcome to Ubuntu 20.04.5 LTS! Set hostname to <523caa1f03e9>. [ OK ] Created slice system-getty.slice. [ OK ] Created slice system-modprobe.slice. [ OK ] Created slice User and Session Slice. [ OK ] Started Dispatch Password Requests to Console Directory Watch. [ OK ] Started Forward Password Requests to Wall Directory Watch. -- Detected virtualization docker. Detected architecture x86-64. Welcome to Ubuntu 20.04.5 LTS! Set hostname to <523caa1f03e9>. *Failed to attach 1 to compat systemd cgroup /system.slice/docker-523caa1f03e9c96a6a12a55fb07df995c6e4b3a27e18585cbeda869b943ae728.scope/init.scope: No such file or directoryFailed to open pin file: No such file or directoryFailed to allocate manager object: No such file or directory[!!!!!!] Failed to allocate manager object.Exiting PID 1...* Does anyone know what might be causing this? Is it a systemd bug? I can copy the info into a GitHub issue if that's helpful. Thanks, Lewis