On 11/11/2024 11:29, jan@uponu.com wrote:
Hi,
we have come came across the issue that some appliances rely on the PCI topology to assign network interfaces and not the mac address.
This is the a problem, because the PCI topology changes, when an instance (the libvirt config) is recreated.
Is there a way to make the network interface order persistent in the PCI topology and if not can someone give me a hint on the steps that would need to be done in nova?
no and this is currently a non goal to add. we create a feature know as device role tagging to provide a way to descover the devices without relying on the topology being stable https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/vi... the exampel shows the data stucture that will be available via the metadata service { "devices":[ { "type":"nic", "bus":"pci", "address":"0000:00:02.0", "mac":"01:22:22:42:22:21", "tags":["nfvfunc1"] }, { "type":"nic", "bus":"pci", "address":"0000:00:03.0", "mac":"01:22:22:42:22:21", "tags":["nfvfunc2"] }, { "type":"disk", "bus":"scsi", "address":"1:0:2:0", "serial":"disk-vol-2352423", "tags":["oracledb"] }, { "type":"disk", "bus":"pci", "address":"0000:00:07.0", "serial":"disk-vol-24235252", "tags":["squidcache"] } ] } so you can lookup the mac/pci adress for a given nic by its tag and use that to corralate the devices in the guest. there are bugs in older release where the pci adress included was the host not the guest adress but i beliv ethat was fix upstream a long time ago. the mac is proably better for nics to use for corration as that works across all releases since this was added in newton.
I think this could be an important feature in general.
Thanks
Jan ------ E-Mail: jan@uponu.com