Removing LXD VM breaks further refresh

Bug #1904758 reported by Alberto Donato
6
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

Alberto Donato (ack)
Changed in maas:
assignee: nobody → Alberto Donato (ack)
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.
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.