lxc.conf post-stop gets called even if LXC_AUTO is set to false

Bug #949362 reported by Stéphane Graber on 2012-03-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Low
Serge Hallyn

Bug Description

Calling "stop" in pre-start causes upstart to jump directly to post-stop, not skip it.

The case where this would be a problem is so specific that this really isn't a big issue but probably still worh fixing :)

Case where we'd see the problem:
 - Booting a machine
 - Starting containers before lxc.conf is called
 - Have these containers symlinked in /etc/lxc/auto
 - Have LXC_AUTO=false in /etc/default/lxc
 - When lxc.conf is called by upstart, it'll just to post-stop, killing the containers in the process

As I said, pretty unlikely to happen but still possible :)

Related branches

James Page (james-page) wrote :

Confirmed; adding a check for LXC_AUTO=false to the post-stop script would make sense to me and should resolve the issue.

Changed in lxc (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Changed in lxc (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-3ubuntu35

---------------
lxc (0.7.5-3ubuntu35) precise; urgency=low

  [Gary Poster]
  * lxc-start-ephemeral: convert ephemeral approach to change all bound fstab
    mounts; convert binding to also modify fstab
  [Benji York]
  * lxc-start-ephemeral: munge the fstab and comment out a flaky line
  [Serge Hallyn]
  * 0056-dont-watch-utmp: don't watch utmp if kernel supports container
    reboot. (LP: #948623)
  * debian/control: add dh-apparmor to Build-Depends (LP: #948481)
  * lxc-start-ephemeral: add '-d' option to daemonize.
  * debian/lxc.upstart: don't run post-stop if LXC_AUTO=false (LP: #949362)
 -- Serge Hallyn <email address hidden> Mon, 12 Mar 2012 09:51:59 -0500

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

Other bug subscribers