Comment 15 for bug 1553617

Revision history for this message
Mike Pontillo (mpontillo) wrote :

It's interesting that you mention MACs moving about; we actually use this assumption to determine when someone has moved a NIC between machines. (we'll notice this - and log it - if we see a MAC move during commissioning.)

In general, I don't think we assume that MACs are globally unique for all interface types, but we *do* make the assumption for physical interfaces, which is why we saw this second issue. You're right that we should watch out for other cases like this which may lead to duplicate MACs. (For example, we may currently treat bridges as "physical" interfaces, in which case we might see a similar issue if someone configures a bridge with same MAC as their physical interface.)

Here's a preview of a change that parses /proc/net/bonding/* and adjusts the physical interface MACs back to their original values:

https://paste.ubuntu.com/15317298/

I tested it on the local test bed I used to reproduce the issue, and it allowed the rack to register successfully! If you want to try it, just replace the contents of /usr/lib/python3/dist-packages/provisioningserver/utils/ipaddr.py with the contents of that pastebin. (I figured it's easier that way, since I already had you patch that file once.)