lxc-ls shows wrong status

Bug #1242074 reported by Oliver Mueller
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Invalid
Undecided
Unassigned
Quantal
Won't Fix
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned
Saucy
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Medium
Unassigned

Bug Description

=========================
SRU Justification:
1. Impact: standard lxc-tools do not work (transparently) with autostarted containers. Importantely, a duplicate container can be started.
2. Development fix: make sure to start containers (in lxc-instance) such that their command sockets are not in an "anonymous" lxcpath.
3. Stable fix: same as development fix.
4. Test case: Create an autostart container; start it with lxc-instance; look for it with lxc-ls.
5. Regression potential: Incorrectly setup autostart containers may no longer start with a fix. (the /etc/autostart/$name link must be a symbolic link to /var/lib/lxc/$name/config)
==========================

I just upgraded to ubuntu saucy and found a strange behaviour. The command lxc-ls doesn't show the correct status of running machines.

as you can see my output for jenkins is "stopped", but I am logged into the system (jenkins) at the very same moment, so it is running. I can also do thinks within the virtual machine, but the status doesn't change.

# lxc-ls --fancy
NAME STATE IPV4 IPV6 AUTOSTART
-----------------------------------------
jenkins STOPPED - - NO
php-54-32 STOPPED - - NO
test STOPPED - - NO

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1242074] [NEW] lxc-ls shows wrong status

Thanks for submitting this bug. Can you confirm whether the jenkins
machine was auto-started by lxc-instance? If not, can you please
run 'apport-collect 1242074' to have apport upload more information,
and tell us the path and type of container, and how you created and started
it?

 status: incomplete

Changed in lxc (Ubuntu):
status: New → Incomplete
Revision history for this message
Oliver Mueller (oliver-vpr) wrote :

it was autostarted

Sent from my iPad

> On 20.10.2013, at 22:12, Serge Hallyn <email address hidden> wrote:
>
> Thanks for submitting this bug. Can you confirm whether the jenkins
> machine was auto-started by lxc-instance? If not, can you please
> run 'apport-collect 1242074' to have apport upload more information,
> and tell us the path and type of container, and how you created and started
> it?
>
> status: incomplete
>
>
> ** Changed in: lxc (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1242074
>
> Title:
> lxc-ls shows wrong status
>
> Status in “lxc” package in Ubuntu:
> Incomplete
>
> Bug description:
> I just upgraded to ubuntu saucy and found a strange behaviour. The
> command lxc-ls doesn't show the correct status of running machines.
>
> as you can see my output for jenkins is "stopped", but I am logged
> into the system (jenkins) at the very same moment, so it is running. I
> can also do thinks within the virtual machine, but the status doesn't
> change.
>
>
> # lxc-ls --fancy
> NAME STATE IPV4 IPV6 AUTOSTART
> -----------------------------------------
> jenkins STOPPED - - NO
> php-54-32 STOPPED - - NO
> test STOPPED - - NO
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1242074/+subscriptions

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

Drat my comment got lost.

The lxc-instance job ends up starting containers as 'anonymous'. You can see them using

  lxc-list -P /var/lib/lxc_anon

The autostart code is currently being reworked but I think this is worth fixing in older releases. It coudl be fixed in one of two ways - or both: the lxc-instance job could detect that linked file is a standard container's config and start it that way (without specifying -f); or lxc-start could detect that the passed-in rcfile is a link to a standard $lxcpath/$name/config, and not start the container anonymously.

Changed in lxc (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * Fix syntax error in upstart job.
 -- Stephane Graber <email address hidden> Mon, 21 Oct 2013 18:51:36 -0400

Changed in lxc (Ubuntu Trusty):
status: Triaged → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This was fixed in saucy by the fix for 1244301

Changed in lxc (Ubuntu Saucy):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxc (Ubuntu Precise):
status: New → Confirmed
Changed in lxc (Ubuntu Quantal):
status: New → Confirmed
Changed in lxc (Ubuntu Raring):
status: New → Confirmed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Precise and Quantal are pre-1.0, were they actually affected by this bug?

Changed in lxc (Ubuntu Raring):
status: Confirmed → Won't Fix
Revision history for this message
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in lxc (Ubuntu Quantal):
status: Confirmed → Won't Fix
Changed in lxc (Ubuntu Precise):
status: Confirmed → Invalid
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.