LXD VM hosts can't be refreshed if VLANs interfaces aren't named $parent.$vid

Bug #1929086 reported by Björn Tillenius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Björn Tillenius
3.0
Fix Released
High
Björn Tillenius

Bug Description

This is with MAAS 3.0.0~rc1.

Register a LXD VM host that has a VLAN interface that isn't name like eth1.123 (parent name and vid), e.g. myvlan.

If you refresh the LXD VM host, it will stall.

If you look in the logs, you'll see that the metadata server return a 409 Conflict.

The reason for that is that we have code VLANInterface that ignores the given name, unless it's a controller.

update_vlan_interface() calls VLANInterface.objects.get_or_create(name="myvlan",....)
VLANInterface.get_or_create() first creates an interface with no parents, named "vlan123". After that it links the parent interface, and calls interface.save() which will rename the interface to eth1.123.

The first time that code runs it works, since there is no eth1.123. But the second time, eth1.123 already exists, so the unique (node, interface_name) is triggered.

Related branches

Changed in maas:
milestone: none → 3.0.1
importance: Undecided → High
status: New → Triaged
Changed in maas:
assignee: nobody → Björn Tillenius (bjornt)
milestone: 3.0.1 → none
status: Triaged → In Progress
Changed in maas:
milestone: none → 3.0.0
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.0.0 → none
Changed in maas:
milestone: none → 3.2.0-beta1
Changed in maas:
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