[SRIOV] When a VF is bound to a VM, Nova can't retrieve the PCI info
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
sean mooney | ||
Pike |
Won't Fix
|
Undecided
|
Unassigned | ||
Queens |
Won't Fix
|
Undecided
|
Unassigned | ||
Rocky |
Won't Fix
|
Undecided
|
Unassigned | ||
Stein |
Won't Fix
|
Undecided
|
Unassigned | ||
Train |
In Progress
|
Low
|
sean mooney | ||
Ussuri |
In Progress
|
Low
|
sean mooney |
Bug Description
Nova periodically updates the available resources per hypervisor [1]. That implies the reporting of the PCI devices [2]->[3].
In [4], a new feature was introduced to read from libvirt the NIC capabilities (gso, tso, tx, etc.). But when the NIC interface is bound to the VM and the MAC address is not the one assigned by the driver (Nova changes the MAC address according to the info provided by Neutron), libvirt fails reading the non-existing device: http://
This command should be avoided or at least, if the executing fails, the exception could be hidden.
[1]https:/
[2]https:/
[3]https:/
[4]Ia5b6abbbf4e
I was not able to reproduce the issue locally.
I tried the following:
* create a neutron port with vnic_type direct
* change the mac address of the port in neutron
* create a server with the above port
I only see a periodic warning in the nova-compute logs. But it is independent from the fact that the VF is used or not. It only depends on the fact that the VF is whitelisted or not.
WARNING nova.pci.utils [None req-9fbb125a- 021f-4bb2- 9688-f47eae5bd5 64 None None] No net device was found for VF 0000:81:10.2: nova.exception. PciDeviceNotFou ndById: PCI device 0000:81:10.2 not found
Looking at the code [1] I guess in my env the code bails out with the above WARNING and therefore I never hit the self._host. device_ lookup_ by_name( devname) call that blows in your env.
Based on this I think it is OK to put a try-except around self._host. device_ lookup_ by_name( devname) and log a WARNING there and bailing out with None.
[1] https:/ /github. com/openstack/ nova/blob/ 63a03d848196320 912bcc70eb2a8e7 5425fdea84/ nova/virt/ libvirt/ driver. py#L6910