Plugging VFs no longer works without a readable phys_switch_id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Moshe Levi |
Bug Description
Attempting to plug a VF fails with the following stack trace in the nova compute logs:
2017-08-28 17:50:34.716 2843 ERROR os_vif [req-9fe05e3e-
2017-08-28 17:50:34.716 2843 ERROR os_vif Traceback (most recent call last):
2017-08-28 17:50:34.716 2843 ERROR os_vif File "/usr/lib/
2017-08-28 17:50:34.716 2843 ERROR os_vif plugin.plug(vif, instance_info)
2017-08-28 17:50:34.716 2843 ERROR os_vif File "/usr/lib/
2017-08-28 17:50:34.716 2843 ERROR os_vif self._plug_
2017-08-28 17:50:34.716 2843 ERROR os_vif File "/usr/lib/
2017-08-28 17:50:34.716 2843 ERROR os_vif pci_slot, pf_interface=True, switchdev=True)
2017-08-28 17:50:34.716 2843 ERROR os_vif File "/usr/lib/
2017-08-28 17:50:34.716 2843 ERROR os_vif raise exception.
2017-08-28 17:50:34.716 2843 ERROR os_vif PciDeviceNotFou
2017-08-28 17:50:34.716 2843 ERROR os_vif
It appears that patch https:/
I ran the code interactively on the host system to determine the actual exception:
>>> f = open('/
>>> print f.readline()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 95] Operation not supported
From what I can tell, this should also cause plugging to fail on systems that have no phys_switch_id file at all.
affects: | os-vif → neutron |
Changed in neutron: | |
assignee: | nobody → Moshe Levi (moshele) |
status: | Triaged → In Progress |
This is cause by trying to use sriov passthorugh on a host that does not support hardware offload of ovs.
the work around is to list the sriovnic agent before ovs in the ml2 conf.
e.g. change /etc/neutron/ plugins/ ml2/ml2_ conf.ini form sriovnicswitch
[ml2]
...
mechanism_drivers = openvswitch,
to
[ml2] openvswitch
...
mechanism_drivers = sriovnicswitch,
you might want to also make sure that supported_ pci_vendor_ devs
in the ml2_sriov section does not contain the vendor id and product id of
the vf used for ovs offload. this will ensure that the sriovnic agent will
only manage interfaces that do not require ovs configuration.
if you had a nic that supported ovs offload and it is enable then doing a pci pci_vendor_ devs.
pass through of the device without os-vif plugging the nic woudl resulst in a broken
dataplane hence the reason from removing them from the supported_
there is still a bug in os-vif here where we should first check the file exits before trying to use it so we should still harden the code. so lets keep this open to track that.