Device tagging does not work for PF passthrough
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Artom Lifshitz | ||
Queens |
Fix Committed
|
Medium
|
Artom Lifshitz |
Bug Description
Description
===========
When booting an instance with a PF passed through, device tags applied to the PF do not appear in the metadata.
Steps to reproduce
==================
Create a PF neutron port:
$ neutron port-create sriov --binding:vnic-type direct-physical --name pf
Boot a VM with that port:
$ nova test-sriov_vf_2 [...] --nic port-id=
From inside the guest, access the metadata:
$ curl http://
Expected result
===============
A device with role tag 'ticky' appears in the metadata.
Actual result
=============
No device with role tag 'ticky' in the metadata.
Environment
===========
1. Exact version of OpenStack you are running.
This was originally reported in Red Hat OpenStack 10 (Newton), but I believe the problem still exists on master.
2. Which hypervisor did you use?
libvirt+kvm
3. Which networking type did you use?
neutron
Changed in nova: | |
importance: | Undecided → Medium |
I believe this is happening because in _build_ device_ metadata [1], we only consider <interface> elements in the libvirt XML, whereas PF passthrough appears as a <hostdev> element.
[1] https:/ /github. com/openstack/ nova/blob/ master/ nova/virt/ libvirt/ driver. py#L8041