Removing LXD VM breaks further refresh
Bug #1904758 reported by
Alberto Donato
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Alberto Donato | ||
2.9 |
Fix Released
|
High
|
Alberto Donato |
Bug Description
If a machine which is a VM in a registered LXD VM host is removed from maas, trying to refresh the VM host will fail with the following error:
{'__all__': ['Virtual machine with this Bmc and Identifier already exists.']}
The reason is that the VirtualMachine that was previously linked to the machine is left around in MAAS (which is intended as the VM actually still exists in LXD).
When refreshing, maas should look first if a VirtualMachine already exists for the VM and update it as needed, linking it to the new machine.
Also, it seems maas currently doesn't remove VirtualMachines that have been removed from LXD during a refresh (unless they're linked to a Node).
Related branches
~ack/maas:1904758-lxd-pod-refresh-fix-2.9
- MAAS Lander: Needs Fixing
- Alberto Donato (community): Approve
-
Diff: 145 lines (+62/-6)4 files modifiedsrc/maasserver/models/bmc.py (+15/-3)
src/maasserver/models/node.py (+6/-0)
src/maasserver/models/tests/test_bmc.py (+39/-1)
src/maasserver/models/tests/test_node.py (+2/-2)
~ack/maas:1904758-lxd-pod-refresh-fix
Merged
into
maas:master
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 145 lines (+62/-6)4 files modifiedsrc/maasserver/models/bmc.py (+15/-3)
src/maasserver/models/node.py (+6/-0)
src/maasserver/models/tests/test_bmc.py (+39/-1)
src/maasserver/models/tests/test_node.py (+2/-2)
Changed in maas: | |
assignee: | nobody → Alberto Donato (ack) |
Changed in maas: | |
status: | Triaged → In Progress |
no longer affects: | maas/trunk |
Changed in maas: | |
milestone: | 2.9.0rc2 → none |
Changed in maas: | |
milestone: | none → next |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | next → none |
status: | Fix Committed → Fix Released |
To post a comment you must log in.