This task goes in parallel with T268802: Manage frack switches with Netbox, but has slightly wider ambition, namely:
- Use Netbox to document fundraising switch -> server port assignments, vlans and speeds
- Use Netbox to record IP allocations for the fundraising vlans
- Use Netbox to manage DNS records for fundraising assigned IPs
While working through the upgrade of the Fundraising network equipment (T377381) it seemed to me like all of these should be possible.
Step 1: Import existing data
As a first step we should import all the current data (based on LLDP, info from fundraising SREs or otherwise as discussed in T268802). Once in place we would need to delete all the existing manual DNS entries in the wmnet and 10.in-addr.arpa zones, and add INCLUDEs for the new zone snippets Netbox will generate based on the data we enter.
Step 2: Improve Netbox provisioning script to support frack vlans
We need at least a few additions here:
- Augment the 'Vlan Type' drop down in the provisioning script to allow selection of one of the frack vlan types
- i.e. bastion, administration, fundraising, listenerdmz
- Find a way to make the script select the frack-management subnet for the server mgmt interface if one of those is selected
- Deal with the dual-links from server to switch
On the last point there is already a convention that a given server connects to the same port number on both fasw's in its rack. So we can still accept a single "switch port" as input, but add a connection to both switches on that port.
All the frack switches have a "bond0" interface where their primary IP is added, so that interface is easy in Netbox. Both physical interfaces are part of the bond, however we will still have the annoying issue of the Linux names for the physical devices.
Unlike for WMF production hosts the fundraising Puppet is separate, so we have no option to import the actual interface names from PuppetDB after provisioning (or at least I don't believe we can). This does, however leave us a few options:
- Option 1: Do not model the server<->switch links in Netbox
- Just set the required vlan on the switch ports
- We can set the switch port description to the host name to at least record it there
- Add a virtual 'bond0' interface on the server and add the server primary IP to it
- Option 2: Use some kind of generic name for the server interfaces
- We could create two interfaces on the servers, with generic names ## PRIMARY## and ## SECONDARY ##
- These can be connected to the switch ports in Netbox, have cable IDs assigned etc
- The 'bond0' on the server should still be where the IP is attached
- 'bond0' can be a LAG device in Netbox and the two physical ints can be members
I've no particular preference here tbh, interested in what others think.