Page MenuHomePhabricator

ImportPuppetDB virtual chassis detection bug
Closed, ResolvedPublic

Description

When running https://netbox.wikimedia.org/extras/scripts/interface_automation.ImportPuppetDB/ on cp4021, and most likely all devices in the same rack, it attaches it to the wrong switch.

asw2-ulsfo: created interface xe-1/0/0
asw2-ulsfo: updating vlans for interface xe-1/0/0
cp4021: Remove cable from enp5s0f0
cp4021: created cable 1038

While the server is connected to asw1-ulsfo.

LLDP returns "asw2-ulsfo" as switch name, as it's the virtual name of the virtual switch, but it also matches the name of the physical switch. So the VC detection logic doesn't trigger because of the direct match.

In other sites, the physical switches have their rack info part of their name, making them unique.

As we're moving away from virtual chassis and the existing VC detection logic is complex/brittle, I suggest we rename the VC members asw2-22-ulsfo and asw2-23-ulsfo to match their rack names.
Afaik it only needs to happen in Netbox and nothing else needs to be updated (monitoring, switch config, etc) as everything use the VC name.
then re-run the above script in dry-run mode.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Suggestion makes sense, using the rack names in the devices also keeps a consistent standard across sites.

So yeah +1 from me, if this simple fix sorts the problem seems the easiest way forward.

ayounsi claimed this task.

Done and confirmed that it solves the issue.