lxc-attach stopped working for docker containers

Bug #1244301 reported by kiorky
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned
Saucy
Fix Released
High
Unassigned

Bug Description

I think https://github.com/lxc/lxc/commit/69733b5dd27e6963267ff6473d9b41dfb59a3f0f has fixed this bug and am requesting for a new release of lxc in saucy and trusty.
The main blocker is that docker containers are hitted by https://github.com/dotcloud/docker/issues/2278 where lxc-attach can no longer attach to them.

Thanks !

=====================
1. impact: containers starte with a custom configuration file cannot be controlled the same way as normal containers. Instead a custom lxcpath, formed by appending "_anon" to the real lxcpath, must be apssed to lxc-console, lxc-stop, lxc-attach, etc.
2. development fix: don't specify a custom lxcpath
3. stable fix: same as dev fix
4. test case:
    sudo lxc-create -t ubuntu -n u1
    sudo lxc-start -n u1 -f /var/lib/lxc/u1/config
    sudo lxc-info -n u1
    # shows not running
5. regression potential: this is cherrypicked from upstream and should have no regressions.
========================

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks - I assume that the docker containers are started with 'lxc-start <...> -f cofnigfile'. That is the trigger for the use of the anon lxcpath, which also caused autostart to fail. The git commit you cite is indeed the fix for this. I"ll fix this in trusty and SRU to saucy.

Changed in lxc (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in lxc (Ubuntu Saucy):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
kiorky (kiorky) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.0.0~alpha2-0ubuntu4

---------------
lxc (1.0.0~alpha2-0ubuntu4) trusty; urgency=low

  * get_rid_of_lxcpath_anon_idea.patch: allow lxc-stop and lxc-attach to
    work more easily with containers started with a custom config (-f).
    (LP: #1244301)
 -- Serge Hallyn <email address hidden> Thu, 24 Oct 2013 11:55:06 -0500

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
kiorky (kiorky) wrote :

Is that normal not having an update on saucy ?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

The fix needs to go into the development release first, which just happened. Then it can be SRU'd (Stable Release Update) to stable releases. This is to set a high bar for stable release updates so that we minimize the risk of breakage to installed stable releases.

description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote : Please test proposed package

Hello kiorky, or anyone else affected,

Accepted lxc into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/lxc/1.0.0~alpha1-0ubuntu12 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lxc (Ubuntu Saucy):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Morearty (bmorearty) wrote :

I verified the proposed package on Saucy 13.10.

I used package 1.0.0~alpha1-0ubuntu12

tags: added: verification-done
removed: verification-needed
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I can confirm the fix as well.

Changed in lxc (Ubuntu Saucy):
milestone: none → saucy-updates
Revision history for this message
kiorky (kiorky) wrote :

Also confirmed

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

FYI, this issue is also reported in Docker's bug tracker at https://github.com/dotcloud/docker/issues/2476

Revision history for this message
kiorky (kiorky) wrote :

No, the first reported and no duplicate bug on github is #2278, the one reported on the desc of this bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.0.0~alpha1-0ubuntu12

---------------
lxc (1.0.0~alpha1-0ubuntu12) saucy-proposed; urgency=low

  * 0012-ubuntu-Improper-pty-permissions.patch: fix pty permissions
    (LP: #1242913)
  * 0013-get-rid-of-lxcpath_anon-idea.patch: make containers started with
    a custom config easier to manage. (LP: #1244301)
 -- Serge Hallyn <email address hidden> Fri, 25 Oct 2013 15:42:27 -0500

Changed in lxc (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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.