lxc fails to start inside vivid container

Bug #1442228 reported by Serge Hallyn on 2015-04-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
init-system-helpers (Ubuntu)
High
Unassigned
lxc (Ubuntu)
Critical
Unassigned
upstart (Ubuntu)
High
Unassigned

Bug Description

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.

Changed in init-system-helpers (Ubuntu):
status: New → Triaged
Changed in upstart (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in init-system-helpers (Ubuntu):
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 1.13.2-0ubuntu13

---------------
upstart (1.13.2-0ubuntu13) vivid; urgency=medium

  * remove running-in-container - it is moved to init-system-helpers and
    made to work also with systemd. (LP: #1442228)
 -- Serge Hallyn <email address hidden> Thu, 09 Apr 2015 18:40:12 -0500

Changed in upstart (Ubuntu):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package init-system-helpers - 1.22ubuntu10

---------------
init-system-helpers (1.22ubuntu10) vivid; urgency=medium

  * Move /bin/running-in-container from upstart and update it so that
    systemd-based vivid hosts can use it. (LP: #1442228)
 -- Serge Hallyn <email address hidden> Thu, 09 Apr 2015 18:40:41 -0500

Changed in init-system-helpers (Ubuntu):
status: Triaged → Fix Released
Changed in lxc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers