[2.3, pod] Unable to delete a machine or a pod if the pod no longer exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Newell Jensen |
Bug Description
I deleted a machine that was running a POD, however, I'm unable to delete the machines from that pod or the pod itself. This is obviously a problem because the pod really no longer exists.
"Unable to decompose machine because: Failed talking to pod: Failed to login to virsh console."
I would imagine that we need to be smart about this and do:
- if we are releasing a machine, or decomposing the machine, then it should definitely fail to decompose.
- if we are deleting the machine or the pod, since we are confirming the deletion via the UI, then we should definitely force the deletion.
It seems that the function decompose_machines where this error is surfaced, should actually be receiving the action being told to differentiate whether this comes from a delete or from a simple release/decompose.
Related branches
- Blake Rouse (community): Approve
-
Diff: 151 lines (+24/-60)2 files modifiedsrc/maasserver/models/bmc.py (+19/-41)
src/maasserver/models/tests/test_bmc.py (+5/-19)
Changed in maas: | |
milestone: | none → 2.3.0beta3 |
Changed in maas: | |
importance: | Undecided → High |
status: | New → Triaged |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in maas: | |
assignee: | nobody → Newell Jensen (newell-jensen) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
As per the SU discussion:
1. If a user tries to delete/decompose a *machine* inside a pod that it cannot communicate with anymore, MAAS should *continue* to prevent it.
2. If a user tries to delete a *pod*, MAAS should just go ahead and delete the pod (and all machines inside the pod, even if it cannot communicate with the pod anymore.