remove-machine --force does not remove lxd container
Bug #1808034 reported by
Xav Paice
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Christian Muirhead |
Bug Description
When I run `juju remove-machine --force $machine` for an LXD container on a maas deployed host, it doesn't remove the LXD container and leaves it running even though it's gone from the model.
This is a controller with 2.5-rc1 and model 2.5-beta3.
Changed in juju: | |
assignee: | nobody → Christian Muirhead (2-xtian) |
status: | Triaged → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
After investigation we think this was a bug in the 1.25 upgrade process. The LXC containers when converted to LXD containers got new IDs, like juju-machine- 1-lxd-0 -> juju-958f87- 1-lxd-0, but the instanceID collection wasn't updated to reflect that. So when the LXD provisioning on the machine tries to stop the container, it gets told it doesn't exist.
From the logs:
2018-12-09 21:07:12 INFO juju.provisioner provisioner_ task.go: 565 machine 1/lxd/9 already started as instance "juju-958f87- 1-lxd-9" task.go: 565 machine 1/lxd/0 already started as instance "juju-machine- 1-lxd-0" task.go: 565 machine 1/lxd/1 already started as instance "juju-machine- 1-lxd-1" task.go: 565 machine 1/lxd/2 already started as instance "juju-machine- 1-lxd-2" task.go: 565 machine 1/lxd/3 already started as instance "juju-machine- 1-lxd-3" task.go: 565 machine 1/lxd/4 already started as instance "juju-machine- 1-lxd-4" task.go: 565 machine 1/lxd/5 already started as instance "juju-machine- 1-lxd-5" task.go: 565 machine 1/lxd/6 already started as instance "juju-machine- 1-lxd-6" task.go: 282 provisioner- harvest- mode is set to destroyed; unknown instances not stopped [juju-958f87- 1-lxd-5 juju-958f87-1-lxd-6 juju-958f87-1-lxd-0 juju-958f87-1-lxd-1 juju-958f87-1-lxd-2 juju-958f87-1-lxd-3 juju-958f87- 1-lxd-4]
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_
2018-12-09 21:07:12 INFO juju.provisioner provisioner_