MAAS 3.4 and 3.5 are not automatically moving the boot NIC to the same VLAN of the rack controller
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Jacopo Rota | ||
3.4 |
Fix Released
|
High
|
Unassigned | ||
3.5 |
Fix Committed
|
High
|
Unassigned |
Bug Description
In 3.4 and 3.5 MAAS is not automatically moving a machine interface to the same vlan of the rack controller.
Steps to reproduce:
1) you need a region+rack controller with 2 interfaces on 2 different subnets, say 10.1.1.0/24 and 11.1.1.0/24
2) create a VLAN 10 for the subnet 10.1.1.0/24 and a VLAN 20 for the subnet 11.1.1.1/24
3) wait for the changes to be reflected to the controller (or simply restart MAAS and wait a couple of minutes)
4) enable DHCP on both subnets
5) use a machine with 2 interfaces using the 2 VLANS
6) commission the machine
7) swap the cables on the machine (meaning that the first NIC will be on the second VLAN and viceversa)
8) deploy the machine
the boot interface will be still using the first VLAN.
Related branches
- MAAS Lander: Approve
- Jacopo Rota: Approve
-
Diff: 226 lines (+145/-42)2 files modifiedsrc/maasserver/rpc/boot.py (+50/-41)
src/maasserver/rpc/tests/test_boot.py (+95/-1)
- MAAS Lander: Approve
- Jacopo Rota: Approve
-
Diff: 225 lines (+145/-41)2 files modifiedsrc/maasserver/rpc/boot.py (+50/-41)
src/maasserver/rpc/tests/test_boot.py (+95/-0)
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 225 lines (+145/-41)2 files modifiedsrc/maasserver/rpc/boot.py (+50/-41)
src/maasserver/rpc/tests/test_boot.py (+95/-0)
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
The bug has been introduced here https:/ /github. com/canonical/ maas/commit/ 20c7bab8 . In particular MAAS is not using anymore the built-in type for mac addresses and when internally MAAS wants to retrieve an interface by mac, it has to convert it to the text format used to store the MAC address.
Unfortunately this was not done in all the places, in particular when the rack is requesting the configuration for a machine it will also provide the machine's mac address in the format like "XX-XX-XX-XX-XX", instead of "XX:XX:XX:XX:XX". As we are not normalising the mac address here https:/ /github. com/canonical/ maas/blob/ cb2b108305c2dbd 217853e8c5476c3 0f56d22081/ src/maasserver/ rpc/boot. py#L505, we fail to retrieve the interface and we don't update the vlan by consequence