nova diagnostics command is not working with all interfaces
Bug #1821798 reported by
François Palin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
François Palin | ||
Queens |
Fix Committed
|
Medium
|
François Palin | ||
Rocky |
Fix Released
|
Medium
|
François Palin | ||
Stein |
Fix Released
|
Medium
|
Lee Yarwood |
Bug Description
When running nova diagnostics on instances with SR-IOV interfaces, we get:
$ nova diagnostics iperf-server
ERROR (ClientException): Unexpected API Error. Please report this at http://
<type 'exceptions.
tags: | added: libvirt |
Changed in nova: | |
importance: | Undecided → Medium |
To post a comment you must log in.
The extract below was taken from the domain xml for an instance that failed diagnostics command
and shows that "target dev" is present under regular bridge interface, but is missing from vfio interface:
<interface type='bridge'> 'fa:16: 3e:c1:e3: fe'/> 'qbr275587c1- 50'/> 1-50'/> <<<<<<< target dev only present under this interface 'fa:16: 3e:6f:4d: bc'/>
<origstates>
<unbind/ >
</origstates >
<mac address=
<source bridge=
<target dev='tap275587c
<model type='virtio'/>
<mtu size='9000'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<interface type='hostdev' managed='yes'>
<mac address=
<driver name='vfio'/>
<source>
<address type='pci' domain='0x0000' bus='0x04' slot='0x17' function='0x4'/>
</source>
<vlan>
<tag id='0'/>
</vlan>
<alias name='hostdev0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
As a result, method _get_io_devices() only returns the bridge interface when called by get_instance_ diagnostics( ) and details[ 0] created.
the following loop:
for interface in dom_io["ifaces"]:
only gets executed once.
This in turn results in having only diags.nic_
In the failing loop at the end of method get_instance_ diagnostics, the code looks in the domain xml for ./devices/ interface/ mac, details[ index]. mac_address
and finds the 2 interface occurences, therefore exceeding the max index by 1 when trying to write to diags.nic_