Comment 14 for bug 1696125

Revision history for this message
Matt Riedemann (mriedem) wrote : Re: Detach interface failed - Unable to detach from guest transient domain (pike)

Got a hit in the neutron debug patch:

http://logs.openstack.org/94/471494/2/check/gate-tempest-dsvm-neutron-linuxbridge-ubuntu-xenial/e0332b9/logs/screen-n-cpu.txt.gz#_Jun_12_22_21_12_373317

http://paste.openstack.org/show/612460/

So when this fails, we're looking for this:

<interface type="ethernet">
  <mac address="fa:16:3e:3b:f6:dc"/>
  <model type="virtio"/>
  <driver name="qemu"/>
  <target dev="tapb2bdb0c0-62"/>
</interface>

And within the guest I see:

<interface type='ethernet'>
  <mac address='fa:16:3e:3b:f6:dc'/>
  <target dev='tapb2bdb0c0-62'/>
  <model type='virtio'/>
  <driver name='qemu'/>
  <alias name='net1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</interface>

This is what it's comparing against:

https://github.com/openstack/nova/blob/a2dd78580ec5bcc7a73924cde46a53afe2c09348/nova/virt/libvirt/guest.py#L251-L255

if (interface.mac_addr == cfg.mac_addr and
       interface.net_type == cfg.net_type and
       interface.source_dev == cfg.source_dev and
       interface.target_dev == cfg.target_dev and
       interface.vhostuser_path == cfg.vhostuser_path):
return interface

Which is going to match on net_type, mac_addr and target_dev since source_dev and vhostuser_path are both None.