Comment 4 for bug 1621076

Revision history for this message
Eugene Frolov (efrolov) wrote :

> What version of nova/neutron are you using?

The bug can be reproduced on any mitaka version. I tried latest code from github.
nova: commit fb3f1706c68ea5b58f05ea810c6339f2449959de
neutron: commit 5e6168fab36415d6d677c32501e64371f74a6992

>What is the use case for this? I've never heard of anyone trying to do this in nova and not sure if it's supposed to be supported.

if it is not supported then I should get an error when I connecting port to instance. Otherwise I should detach interface.

> This is where it blows up:
> https://github.com/openstack/nova/blob/d0775c50d0c2bd50a62ccd49ea7063948af6c3b3/nova/virt/libvirt/driver.py#L1400
> https://github.com/openstack/nova/blob/d0775c50d0c2bd50a62ccd49ea7063948af6c3b3/nova/virt/libvirt/guest.py#L404

I think, yes. Also I have trace from libvirt:
 Traceback (most recent call last):
   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1522, in detach_interface
     guest.detach_device(cfg, persistent=True, live=live)
   File "/opt/stack/nova/nova/virt/libvirt/guest.py", line 357, in detach_device
     self._domain.detachDeviceFlags(conf.to_xml(), flags=flags)
   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 186, in doit
     result = proxy_call(self._autowrap, f, *args, **kwargs)
   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 144, in proxy_call
     rv = execute(f, *args, **kwargs)
   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 125, in execute
     six.reraise(c, e, tb)
   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 83, in tworker
     rv = meth(*args, **kwargs)
   File "/usr/local/lib/python2.7/dist-packages/libvirt.py", line 985, in detachDeviceFlags
     if ret == -1: raise libvirtError ('virDomainDetachDeviceFlags() failed', dom=self)
 libvirtError: operation failed: multiple devices matching mac address fa:16:3e:b1:8a:7c found

> Can you recreate this with DEBUG logging and post the xml output from this?

Generated XML ('<interface type="bridge">\n <mac address="fa:16:3e:b1:8a:7c"/>\n <model type="virtio"/>\n <source bridge="qbr418139e8-e2"/>\n <target dev="tap418139e8-e2"/>\n</interface>\n',)