-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Nexus sends details about NICs for both instances and services to the sled agent with the NetworkInterface. That's very similar to the database model types for a NIC, but includes a few things we only know from other tables, like the VPC's VNI and the VPC subnet's IP subnet itself.
This needs to be extended with dual-stack support, but it's important we do that in a backwards-compatible way. When we first release a commit with this update, the Nexus instances driving the update will send the existing version of this type on the wire to a new sled-agent. Only after all those are done will we quiesce and update those Nexus instances themselves.
Note that we also populate this type from an internal helper called NicInfo, which is the result of the join used to get the VNI and IP Subnet. That query and this intermediate type also need to be extended to select any IPv6 address and subnet too.
- Add an optional
ipv6field to theNicInfostruct - Rename the existing
ipfield of theNicInfostruct toipv4and make it optional - This isn't crucial, but we could make the
slotinto aSqlU8. That unsigned type didn't exist when we first wrote this code. - Add new optional
ipv6andipv6_subnetfields to theNetworkInterfacestruct. Do not rename the existingipandsubnetfields, at least in the serialized representation.
The InstanceSledLocalConfig type will also need a bit of work. That assumes exactly one SourceNatConfig, which is not optional and today stores the unconditionally-allocated IPv4 SNAT address information. We will need to extend one or both of these types for dual-stack support as well. I'm not entirely sure how to do that yet, in a backwards-compatible way.