Page MenuHomePhabricator

Netbox import interfaces script ##PRIMARY## type not updated
Closed, ResolvedPublic


When the Netbox import script from PuppetDB is run, the interface type is properly set for new interfaces, but it's not corrected for already created interfaces, notably PRIMARY.

We need to modify the script so that it checks and update the interface type from the PuppetDB data even on already created interfaces.

Event Timeline

Volans triaged this task as High priority.Oct 13 2020, 9:57 AM
Volans created this task.

Once the script is fixed we should re-run the puppetdb import for any device that has been installed after the mass-import on Sep. 14th.

Something like this should gather a possible list of hosts (to be double checked, better to err on the side of re-running it on more hosts than less):

sudo cumin 'P{F:net_driver ~ "10000"} and P{F:uptime ~ "^[1-4]?[0-9] days"}'

Change 637734 had a related patch set uploaded (by Ayounsi; owner: Ayounsi):
[operations/software/netbox-extras@master] PuppetDB import, set interface type when renaming PRIMARY

Change 637734 merged by Ayounsi:
[operations/software/netbox-extras@master] PuppetDB import, set interface type when renaming PRIMARY

We will re-run it anyway on all the hosts for T265339.