removing a unit on an unclean machine should remove that machine
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
Medium
|
Casey Marshall |
Bug Description
A very common workflow for me is to destroy units and add units. Since the underlying machine doesn't get terminated when you do destroy-unit, this is what I do:
- juju status: get the machine id of the unit I want to destroy
- juju destroy-unit myunit/0
- wait a few seconds
- juju terminate-machine <looked-up-id>
- repeat terminate-machine until it does
If I don't do this, either I get recycled machines or dangling machines with no services out there building up against my cloud quota.
Alternatively I can also loop over all machine-ids in the status output (except 0, of course) and call terminate-machine on them all, and let juju decide which ones can be terminated.
What I would like to suggest is a --terminate option to destroy-unit (and perhaps destroy-service too) that would behave like this:
- call destroy-unit
- call terminate-machine on that unit's machine if the machine is vacant (i.e., has no other services on it, lxc, etc).
For destroy-service --terminate it would be similar, just loop over all the units.
Changed in juju-core: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Changed in juju-core: | |
importance: | Wishlist → Medium |
Changed in juju-core: | |
importance: | Medium → Low |
tags: | added: destroy-unit terminate-machine |
tags: | added: canonical-webops |
Changed in juju-core: | |
importance: | Low → Critical |
Changed in juju-core: | |
importance: | Critical → High |
summary: |
- --terminate option for destroy-unit + removing a unit on an unclean machine should stop that machine |
summary: |
- removing a unit on an unclean machine should stop that machine + removing a unit on an unclean machine should remove that machine |
Changed in juju-core: | |
importance: | High → Medium |
Changed in juju-core: | |
assignee: | nobody → Casey Marshall (cmars) |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
milestone: | none → 1.21-alpha1 |
tags: | added: landscape |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
I think the general agreement within the core team is that dirty machines (those that have had units run on them) should be removed by default when remove-unit is run, with (maybe) an option to keep it.