Unity8 LXC session fails due to container not starting fast enough

Bug #1425663 reported by Christopher Townsend
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Unity8 Desktop Preview in LXC
Fix Released
High
Christopher Townsend
unity8-lxc (Ubuntu)
Fix Released
High
Christopher Townsend

Bug Description

After fixing bug #1420468, another issue is hit when trying to start a Unity 8 LXC session.

This is the snippet from /var/log/lightm/unity8-lxc-compositor.log:
lxc_container: lsm/apparmor.c: apparmor_process_label_set: 183 No such file or directory - failed to change apparmor profile to lxc-container-default-with-nesting

The container is actually getting started, so the issue occurs somewhere else.

Further debugging shows that this error comes from the lxc-attach command in /usr/bin/unity8-lxc-compositor.

It seems that the lxc-attach is getting called before lxc-start is finished. Probably need to add an lxc-wait after the lxc-start to guarantee when the container is actually finished starting.

Changed in unity8-preview-lxc:
status: New → In Progress
Changed in unity8-lxc (Ubuntu):
status: New → In Progress
Changed in unity8-preview-lxc:
importance: Undecided → High
Changed in unity8-lxc (Ubuntu):
importance: Undecided → High
Changed in unity8-preview-lxc:
assignee: nobody → Christopher Townsend (townsend)
Changed in unity8-lxc (Ubuntu):
assignee: nobody → Christopher Townsend (townsend)
Changed in unity8-preview-lxc:
milestone: none → 1.0.3
summary: - Unity8 LXC container fails to start
+ Unity8 LXC session fails due to container not starting fast enough
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8-lxc - 1.0.3+15.04.20150305.1-0ubuntu1

---------------
unity8-lxc (1.0.3+15.04.20150305.1-0ubuntu1) vivid; urgency=medium

  [ Chris Townsend ]
  * Bump version to 1.0.3.
  * Add an lxc-wait after lxc-start to make sure the container is
    actually running before proceeding to the lxc-attach. Also, have to
    add an additional half second sleep to account for an lxc race where
    lxc-wait reports the container is running when in reality, it may
    not be. (LP: #1425663)
  * Add config entry to automount sys to work around a new LXC behavior
    in 15.04 and later. (LP: #1420468)
  * Disable the new autodev feature in LXC as it only creates a minimal
    /dev in the container and we need a full /dev. (LP: #1425684)
  * Do not include the default lxc network config as using the
    'flags=up' from it confuses NetworkManager inside the container.
    (LP: #1427743)
  * Fix issue where zsync doesn't seem to handle cross linking across
    filesystems and also detect if the ISO did not download and throw an
    error. (LP: #1418671)

  [ CI Train Bot ]
  * New rebuild forced.
 -- CI Train Bot <email address hidden> Thu, 05 Mar 2015 14:48:22 +0000

Changed in unity8-lxc (Ubuntu):
status: In Progress → Fix Released
Changed in unity8-preview-lxc:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
sticks (orawas) wrote :

This seems to still be an issue. Here's what I'm getting using the latest unity8-lxc 1.0.4-0~63~ubuntu14.04.1

Starting the container
Switching to upstart...
lxc_container: lsm/apparmor.c: apparmor_process_label_set: 183 No such file or directory - failed to change apparmor profile to lxc-container-default-with-nesting

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi sticks,

Yeah, you are seeing this same issue, just in a different place. The fix associated with this bug is just a workaround when actually starting the Unity 8 session. The real issue is in lxc, cgmanager, and/or apparmor.

I really don't want to get into the business of having to pepper workarounds in the code for an issue that lays elsewhere. I will think about the best course of action here. I have bug #1428848 opened for this very issue.

Revision history for this message
fcole90 (fcole90) wrote :

I have the same issue as sticks too on my 14.04

Revision history for this message
huangzhiwu (tianzhiwu2010-q) wrote :

The same issue

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.