Comment 5 for bug 1959047

Revision history for this message
Simon Déziel (sdeziel) wrote (last edit ):

Thanks @stgraber for providing 3.0.3-0ubuntu1~18.04.2~ppa1 (via https://launchpad.net/~stgraber/+archive/experimental). This allowed me to create a Bionic VM in which I created a Jammy container.

The Jammy container (c1) was then configured to have systemd in debug mode:

  root@bionic-vm:~# lxc config set c1 raw.lxc 'lxc.init.cmd = /sbin/init systemd.log_level=debug'

Then in the container, looking for the "Failed to set up namespace" messaged added by the Ubuntu patch on top of systemd:

root@c1:~# journalctl -b0 --grep 'Failed to set up namespace'
Mar 24 20:26:32 c1 systemd[100]: systemd-udevd.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[103]: systemd-networkd.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[110]: systemd-logind.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[113]: systemd-resolved.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:33 c1 systemd[114]: systemd-hostnamed.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:33 c1 systemd[107]: e2scrub_reap.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied

Now if LXD in the Bionic VM is upgraded from 3.0.3-0ubuntu1~18.04.2 to 3.0.3-0ubuntu1~18.04.2~ppa1:

root@bionic-vm:~# apt-get dist-upgrade -y
...
The following packages will be upgraded:
  lxd lxd-client
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,335 kB of archives.
After this operation, 20.5 kB of additional disk space will be used.
Get:1 https://ppa.launchpadcontent.net/stgraber/experimental/ubuntu bionic/main amd64 lxd amd64 3.0.3-0ubuntu1~18.04.2~ppa1 [5,260 kB]
Get:2 https://ppa.launchpadcontent.net/stgraber/experimental/ubuntu bionic/main amd64 lxd-client amd64 3.0.3-0ubuntu1~18.04.2~ppa1 [3,075 kB]
Fetched 8,335 kB in 4s (1,990 kB/s)
...

The namespace setup no longer fails as we see no *new* entries in the journal:

root@c1:~# journalctl -b0 --grep 'Failed to set up namespace'containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[100]: systemd-udevd.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[103]: systemd-networkd.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[110]: systemd-logind.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:32 c1 systemd[113]: systemd-resolved.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:33 c1 systemd[114]: systemd-hostnamed.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied
Mar 24 20:26:33 c1 systemd[107]: e2scrub_reap.service: Failed to set up namespace, assuming containerized execution, ignoring: Permission denied