get_instance_diagnostics expected all interfaces
to have a <target> element with a "dev" attribute in
the instance XML. This is not the case for VFIO
interfaces (<interface type="hostdev">).
This caused an IndexError when looping over
the interfaces.
This patch fixes this issue by retrieving interfaces
data directly from the guest XML and adding nics
appropriately to the diagnostics object.
The new functional test has been left out of this
cherry-pick, since a lot of the test code that
supports the test is missing and would have to be
back-ported just for that one test, including a
ramification of other commit dependencies.
The functional code change itself is rather simple,
and not having this functional test present in
Queens is considered to be low risk.
Change-Id: I8ef852d449e9e637d45e4ac92ffc5d1abd8d31c5
Closes-Bug: #1821798
(cherry picked from commit ab7c968b6f66404c032f62a952e353f94d3be165)
(cherry picked from commit 1d4f64b190afc60b0c2a56de718209869c41cfb3)
(cherry picked from commit 19ca8bcc2232e1d81efc349948a21cc1c3fc811d)
Reviewed: https:/ /review. opendev. org/666152 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2009859b522 5541d8560e5ca1e fb91de644d12be
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 2009859b5225541 d8560e5ca1efb91 de644d12be
Author: Francois Palin <email address hidden>
Date: Tue Mar 26 15:22:40 2019 -0400
Include all network devices in nova diagnostics
get_ instance_ diagnostics expected all interfaces
to have a <target> element with a "dev" attribute in
the instance XML. This is not the case for VFIO
interfaces (<interface type="hostdev">).
This caused an IndexError when looping over
the interfaces.
This patch fixes this issue by retrieving interfaces
data directly from the guest XML and adding nics
appropriately to the diagnostics object.
The new functional test has been left out of this
cherry-pick, since a lot of the test code that
supports the test is missing and would have to be
back-ported just for that one test, including a
ramification of other commit dependencies.
The functional code change itself is rather simple,
and not having this functional test present in
Queens is considered to be low risk.
Change-Id: I8ef852d449e9e6 37d45e4ac92ffc5 d1abd8d31c5 c032f62a952e353 f94d3be165) b0c2a56de718209 869c41cfb3) 81efc349948a21c c1c3fc811d)
Closes-Bug: #1821798
(cherry picked from commit ab7c968b6f66404
(cherry picked from commit 1d4f64b190afc60
(cherry picked from commit 19ca8bcc2232e1d