juju terminate-machine with local provider doesn't destroy machine

Bug #1210054 reported by Sidnei da Silva
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Tim Penhey
juju-core (Ubuntu)
Fix Released
High
Unassigned
Saucy
Fix Released
High
Unassigned

Bug Description

Using local provider for a couple days, I've noticed that terminate-machine doesn't always remove the container. Moreover, destroy-environment doesn't seem to remove the containers either.

Related branches

John A Meinel (jameinel)
Changed in juju-core:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

it would be useful to have the provider logs for the terminate-machine case, and --debug output from destroy-environment.

James Page (james-page)
Changed in juju-core (Ubuntu Saucy):
status: New → Triaged
importance: Undecided → High
Revision history for this message
James Page (james-page) wrote :

jamespage@armstrong:/etc/apparmor.d$ sudo juju --debug destroy-environment
2013-09-18 14:11:27 INFO juju.provider.local environprovider.go:32 opening environment "laptop"
2013-09-18 14:11:27 DEBUG juju.provider.local environ.go:210 found "10.0.3.1" as address for "lxcbr0"
2013-09-18 14:11:27 DEBUG juju.provider.local environ.go:234 checking 10.0.3.1:8040 to see if machine agent running storage listener
2013-09-18 14:11:27 DEBUG juju.provider.local environ.go:250 yes, don't start local storage listeners
WARNING: this command will destroy the "laptop" environment (type: local)
This includes all machines, services, data and other resources.

Continue [y/N]? y
2013-09-18 14:11:38 ERROR juju.container.lxc lxc.go:204 failed to destroy lxc container: error executing "lxc-stop": jamespage-laptop-machine-2 is not running
2013-09-18 14:11:38 ERROR juju supercommand.go:282 command failed: error executing "lxc-stop": jamespage-laptop-machine-2 is not running
error: error executing "lxc-stop": jamespage-laptop-machine-2 is not running

Revision history for this message
James Page (james-page) wrote :

jamespage@armstrong:/etc/apparmor.d$ sudo lxc-list
WARNING: lxc-list is deprecated, please use lxc-ls --fancy.
         This symlink will be dropped in LXC 1.0.

NAME STATE IPV4 IPV6 AUTOSTART
----------------------------------------------------------------------------
jamespage-laptop-machine-1 RUNNING 10.0.3.20 - YES
jamespage-laptop-machine-2 STOPPED - - YES
jamespage-laptop-machine-3 RUNNING 10.0.3.11 - YES
jamespage-laptop-machine-4 RUNNING 10.0.3.95 - YES
jamespage-laptop-machine-5 RUNNING 10.0.3.107, 10.0.3.200 - YES
jamespage-laptop-machine-6 RUNNING 10.0.3.4 - YES
jamespage-laptop-machine-7 RUNNING 10.0.3.204 - YES
jamespage-laptop-machine-8 RUNNING 10.0.3.205 - YES
jamespage-laptop-machine-9 RUNNING 10.0.3.206 - YES

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

Thanks, James. lxc-stop is returning false because the machine is already stopped, and juju is (it seems) stopping there because of failure. We can either (a) have juju ignore lxc-stop failure, (b) just have juju run lxc-destroy -f which will implicitly stop the machine if needed (and not manually run lxc-stop), or (c) update lxc-stop to not return failure if the machine was already stopped.

I personally think both (b) and (c) seem reasonable, though someone may object to the lxc-stop change.

Certainly (b) will work around (c), so (b) by itself will fix this.

Tim Penhey (thumper)
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Tim Penhey (thumper)
milestone: none → 1.15.0
Tim Penhey (thumper)
Changed in juju-core:
milestone: 1.15.0 → 1.15.1
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
James Page (james-page)
Changed in juju-core (Ubuntu Saucy):
status: Triaged → Fix Released
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.