When creating instance specs, propolis-server turns NetworkInterfaceRequest structures it gets from its API into a network device and backend whose names (in the spec) match the name of the host vNIC to which the network adapter should bind (given by the name field in the request). This is bad because the adapter name can change between incarnations of an instance (the name is derived from the OPTE port number that the sled agent picks when creating an instance), which will cause the device and backend name to change, causing a spec mismatch.
An easy fix for this is to derive the device/backend name from the NIC's PCI BDF, which is also given in the request, but is already not allowed to change across a migration. (This matches how viona entities are named in the server's inventory.)
When creating instance specs, propolis-server turns
NetworkInterfaceRequeststructures it gets from its API into a network device and backend whose names (in the spec) match the name of the host vNIC to which the network adapter should bind (given by thenamefield in the request). This is bad because the adapter name can change between incarnations of an instance (the name is derived from the OPTE port number that the sled agent picks when creating an instance), which will cause the device and backend name to change, causing a spec mismatch.An easy fix for this is to derive the device/backend name from the NIC's PCI BDF, which is also given in the request, but is already not allowed to change across a migration. (This matches how viona entities are named in the server's inventory.)