Device tagging does not work for PF passthrough
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Medium
|
Artom Lifshitz | ||
| Queens |
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
Artom Lifshitz (notartom) wrote : | #1 |
Fix proposed to branch: master
Review: https:/
Changed in nova: | |
assignee: | nobody → Artom Lifshitz (notartom) |
status: | New → In Progress |
Stephen Finucane (stephenfinucane) wrote : | #3 |
It appears this also affects VLAN tags, which should be exposed through the metadata service but are not.
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit d16d0d553b20fd4
Author: Artom Lifshitz <email address hidden>
Date: Mon Jan 15 15:36:40 2018 -0500
Refactor _build_
This patch splits out interface and disk metadata generation into its
own function each, in preparation for handling hostdev metadata
generation in a subsequent patch. It also adds some debug logging.
Related-bug: 1743458
Change-Id: I318b9118c97d7b
Changed in nova: | |
status: | In Progress → Fix Released |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit abd01a757b8a83d
Author: Artom Lifshitz <email address hidden>
Date: Mon Jan 15 15:52:11 2018 -0500
Consider hostdev devices when building metadata
Previously, device role tagging metadata would only be built for
LibvirtConf
account for passed through PFs, which can also be tagged and appear as
<hostdev> in the libvirt XML. This caused device role tagging to not
work for PFs. This patch adds support for <hostdev> devices to
_build_
Change-Id: I24e5ff1b446f2a
Closes-bug: 1743458
Closes-bug: 1694183
Related fix proposed to branch: stable/queens
Review: https:/
Fix proposed to branch: stable/queens
Review: https:/
Changed in nova: | |
importance: | Undecided → Medium |
This issue was fixed in the openstack/nova 18.0.0.0b3 development milestone.
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 0f253ea9c5f3f3d
Author: Artom Lifshitz <email address hidden>
Date: Mon Jan 15 15:36:40 2018 -0500
Refactor _build_
This patch splits out interface and disk metadata generation into its
own function each, in preparation for handling hostdev metadata
generation in a subsequent patch. It also adds some debug logging.
NOTE(artom): Conflicts in nova/virt/
VFs not being present in Queens.
Related-bug: 1743458
Change-Id: I318b9118c97d7b
(cherry picked from commit d16d0d553b20fd4
tags: | added: in-stable-queens |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit e57f66a26daf858
Author: Artom Lifshitz <email address hidden>
Date: Mon Jan 15 15:52:11 2018 -0500
Consider hostdev devices when building metadata
Previously, device role tagging metadata would only be built for
LibvirtConf
account for passed through PFs, which can also be tagged and appear as
<hostdev> in the libvirt XML. This caused device role tagging to not
work for PFs. This patch adds support for <hostdev> devices to
_build_
NOTE(artom): Conflicts in nova/tests/
due to trusted VFs not being present in Queens.
Change-Id: I24e5ff1b446f2a
Closes-bug: 1743458
Closes-bug: 1694183
(cherry picked from commit abd01a757b8a83d
Related fix proposed to branch: stable/pike
Review: https:/
Fix proposed to branch: stable/pike
Review: https:/
This issue was fixed in the openstack/nova 17.0.6 release.
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 2460d0ef9438026
Author: Artom Lifshitz <email address hidden>
Date: Mon Jan 15 15:36:40 2018 -0500
Refactor _build_
This patch splits out interface and disk metadata generation into its
own function each, in preparation for handling hostdev metadata
generation in a subsequent patch. It also adds some debug logging.
NOTE(artom): Queens -> Pike backport is clean, conflicts in
nova/
present.
Related-bug: 1743458
Change-Id: I318b9118c97d7b
(cherry picked from commit d16d0d553b20fd4
(cherry picked from commit 0f253ea9c5f3f3d
tags: | added: in-stable-pike |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 5ddcda02a8500ef
Author: Artom Lifshitz <email address hidden>
Date: Mon Jan 15 15:52:11 2018 -0500
Consider hostdev devices when building metadata
Previously, device role tagging metadata would only be built for
LibvirtConf
account for passed through PFs, which can also be tagged and appear as
<hostdev> in the libvirt XML. This caused device role tagging to not
work for PFs. This patch adds support for <hostdev> devices to
_build_
NOTE(artom): Queens -> Pike backport is clean, conflicts in
nova/
VFs not being present.
Change-Id: I24e5ff1b446f2a
Closes-bug: 1743458
Closes-bug: 1694183
(cherry picked from commit abd01a757b8a83d
(cherry picked from commit e57f66a26daf858
This issue was fixed in the openstack/nova 16.1.7 release.
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