NIC information (networks / PXE interface) get's lost due to re-discovering NIC's during commissioning

Bug #1440090 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Ricardo Bánffy

Bug Description

First, I enlisted and commissioned the machine, and the result was the following:

MAC IP Network
52:54:00:96:d6:2b (PXE) 192.168.122.100 (dynamic) maas-virbr0 (192.168.122.0/24)
52:54:00:c1:56:d0 maas-virbr0 (192.168.122.0/24)

Second, I deleted the 52:54:00:c1:56:d0 NIC, and re-commissioned. MAAS successfully updated its NIC information. However, the mapping with network and the discovery of PXE interface was lost. (My guess is because we update all NIC interfaces instead of just removing the one missing). The result was the following:

MAC IP Network
52:54:00:96:d6:2b

Third, I re-added the 52:54:00:c1:56:d0 NIC, and re-commissioned. MAAS successfully update its NIC information. The mapping with network was done successfully after the update but the detection of the PXE was lost (when the machine first PXE booted, before updating NIC info, it detected that 52:54:00:96:d6:2b was the PXE interface, but this disappeared after the NIC's where updated. My guess is that this is due to the fact that all NIC's on the machine were updated, instead of adding the missing one).

MAC IP Network
52:54:00:96:d6:2b 192.168.122.100 (dynamic) maas-virbr0 (192.168.122.0/24)
52:54:00:c1:56:d0 192.168.122.101 (dynamic) maas-virbr0 (192.168.122.0/24)

Fourth, I re-commissioned again without deleting any NIC to see if it would successfully detect the PXE interface this time. However, the result is the same. The PXE interface detection gets lost, and my guess is because during commissioning, NIC's get updated regardless of whether we added new ones or not.

MAC IP Network
52:54:00:96:d6:2b 192.168.122.100 (dynamic) maas-virbr0 (192.168.122.0/24)
52:54:00:c1:56:d0 192.168.122.101 (dynamic) maas-virbr0 (192.168.122.0/24)

What needs to happen during commissioning, to not lose information such as network mapping or PXE interface discovery, is that we should only be adding / deleting the NIC that's been added or removed for the machine respectively. If there has been no NIC changes, then this information should not be updated at all.

Related branches

Changed in maas:
milestone: none → 1.8.0
assignee: nobody → Ricardo Bánffy (rbanffy)
importance: Undecided → Critical
status: New → Triaged
description: updated
description: updated
Revision history for this message
Andres Rodriguez (andreserl) wrote :

This is really critical, as it is causing MAAS to provide the static IP address to the wrong NIC.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Ok, so it seems that in every commissioning, new NIC's are being added, instead of only adding/removing the missing ones. This is also when there are no new nics nor deleted ones, it still seems old get removed and new get added:

Before commissioning:
In [14]: [(mac, mac.id) for mac in node.macaddress_set.all()]
Out[14]: [(<MACAddress: 52:54:00:c1:56:d0>, 17), (<MACAddress: 52:54:00:96:d6:2b>, 18)]

After commissioning:
In [15]: [(mac, mac.id) for mac in node.macaddress_set.all()]
Out[15]: [(<MACAddress: 52:54:00:c1:56:d0>, 19), (<MACAddress: 52:54:00:96:d6:2b>, 20)]

The index has changed.

Revision history for this message
Andres Rodriguez (andreserl) wrote :
Changed in maas:
status: Triaged → Fix Committed
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

Remote bug watches

Bug watches keep track of this bug in other bug trackers.