[Bug 1442228] [NEW] lxc fails to start inside vivid container

Serge Hallyn 1442228 at bugs.launchpad.net
Thu Apr 9 15:23:23 UTC 2015


Public bug reported:

When installing lxc, the lxc.postinst tries to install apparmor profiles.
Inside a vivid container on an upstart-based host, the profile loading
script will test /bin//running-in-container and see that it is in a container
and exit 0.  On a systemd host, /bin/running-in-container doesn't work, so
the profile loading script exits with error, failing the postinst.

/bin/running-in-container needs to be generalized to work with systemd.

Unlike upstart, systemd leaves its environment showing in /proc/1/environ,
so we can in fact simply check for "grep -q container=lxc /proc/1/environ",
which we couldn't do with upstart.  However, to keep things more similar
between upstart and systemd, and to handle all cases, it would probably be
best to have a systemd unit starting at boot which does the same thing as
the /etc/init/container-detect.conf does.

Then move /bin/running-in-container from upstart into init-system-
helpers.

** Affects: lxc (Ubuntu)
     Importance: Critical
         Status: Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1442228

Title:
  lxc fails to start inside vivid container

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1442228/+subscriptions



More information about the Ubuntu-server-bugs mailing list