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.
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"> "fa:16: 3e:3b:f6: dc"/> 0-62"/>
<mac address=
<model type="virtio"/>
<driver name="qemu"/>
<target dev="tapb2bdb0c
</interface>
And within the guest I see:
<interface type='ethernet'> 'fa:16: 3e:3b:f6: dc'/> 0-62'/>
<mac address=
<target dev='tapb2bdb0c
<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/ a2dd78580ec5bcc 7a73924cde46a53 afe2c09348/ 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.