<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Dec 23, 2016 at 1:37 PM Steve Gordon <<a href="mailto:sgordon@redhat.com">sgordon@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----- Original Message -----<br class="gmail_msg">
> From: "Neil Jerram" <<a href="mailto:neil@tigera.io" class="gmail_msg" target="_blank">neil@tigera.io</a>><br class="gmail_msg">
> To: "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" class="gmail_msg" target="_blank">openstack-dev@lists.openstack.org</a>><br class="gmail_msg">
><br class="gmail_msg">
> I appreciate that even libvirt 2.0.0 will be ancient history by now, to its<br class="gmail_msg">
> developers, but I am seeing further issues that look associated with the<br class="gmail_msg">
> recent CentOS 7 transition from libvirt 1.2.7 to libvirt 2.0.0, and would<br class="gmail_msg">
> appreciate any comments on them that people may have.  I believe these<br class="gmail_msg">
> issues are independent of those that have already been discussed on other<br class="gmail_msg">
> threads.<br class="gmail_msg">
><br class="gmail_msg">
> First, this traceback in nova-compute.log:<br class="gmail_msg">
><br class="gmail_msg">
> Traceback (most recent call last):<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line<br class="gmail_msg">
> 2156, in _build_resources<br class="gmail_msg">
>     yield resources<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line<br class="gmail_msg">
> 2009, in _build_and_run_instance<br class="gmail_msg">
>     block_device_info=block_device_info)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line<br class="gmail_msg">
> 2534, in spawn<br class="gmail_msg">
>     block_device_info=block_device_info)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line<br class="gmail_msg">
> 4620, in _create_domain_and_network<br class="gmail_msg">
>     xml, pause=pause, power_on=power_on)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line<br class="gmail_msg">
> 4550, in _create_domain<br class="gmail_msg">
>     guest.launch(pause=pause)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line<br class="gmail_msg">
> 142, in launch<br class="gmail_msg">
>     self._encoded_xml, errors='ignore')<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195,<br class="gmail_msg">
> in __exit__<br class="gmail_msg">
>     six.reraise(self.type_, self.value, self.tb)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/guest.py", line<br class="gmail_msg">
> 137, in launch<br class="gmail_msg">
>     return self._domain.createWithFlags(flags)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 186, in<br class="gmail_msg">
> doit<br class="gmail_msg">
>     result = proxy_call(self._autowrap, f, *args, **kwargs)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 144, in<br class="gmail_msg">
> proxy_call<br class="gmail_msg">
>     rv = execute(f, *args, **kwargs)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 125, in<br class="gmail_msg">
> execute<br class="gmail_msg">
>     six.reraise(c, e, tb)<br class="gmail_msg">
>   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 83, in<br class="gmail_msg">
> tworker<br class="gmail_msg">
>     rv = meth(*args, **kwargs)<br class="gmail_msg">
>   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1065, in<br class="gmail_msg">
> createWithFlags<br class="gmail_msg">
>     if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed',<br class="gmail_msg">
> dom=self)<br class="gmail_msg">
> libvirtError: Cannot find '' in path: No such file or directory<br class="gmail_msg">
><br class="gmail_msg">
> which I believe is caused by the empty path attribute in this part of the<br class="gmail_msg">
> XML:<br class="gmail_msg">
><br class="gmail_msg">
>     <interface type='ethernet'><br class="gmail_msg">
>       <mac address='fa:16:3e:3c:96:33'/><br class="gmail_msg">
>       <script path=''/><br class="gmail_msg">
>       <target dev='tap06992dfb-5d'/><br class="gmail_msg">
>       <model type='virtio'/><br class="gmail_msg">
>       <driver name='qemu'/><br class="gmail_msg">
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'<br class="gmail_msg">
> function='0x0'/><br class="gmail_msg">
>     </interface><br class="gmail_msg">
><br class="gmail_msg">
> which is in turn caused, I think, by<br class="gmail_msg">
> <a href="https://github.com/openstack/nova/blob/master/nova/virt/libvirt/designer.py#L61" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/openstack/nova/blob/master/nova/virt/libvirt/designer.py#L61</a><br class="gmail_msg">
><br class="gmail_msg">
> Is it plausible that libvirt 1.2.7 would have avoided trying to invoke a<br class="gmail_msg">
> script with an empty path, whereas libvirt 2.0.0 does not?<br class="gmail_msg">
<br class="gmail_msg">
It seems someone filed this as <a href="https://bugs.launchpad.net/nova/+bug/1649527" rel="noreferrer" class="gmail_msg" target="_blank">https://bugs.launchpad.net/nova/+bug/1649527</a> from a Nova POV. The Libvirt folks helped me narrow this down to this commit being the first one that would have exhibited this behavior:<br class="gmail_msg">
<br class="gmail_msg">
    <a href="https://libvirt.org/git/?p=libvirt.git;a=commit;h=9c17d665fdc5f0ab74500a14c30627014c11b2c0" rel="noreferrer" class="gmail_msg" target="_blank">https://libvirt.org/git/?p=libvirt.git;a=commit;h=9c17d665fdc5f0ab74500a14c30627014c11b2c0</a><br class="gmail_msg">
<br class="gmail_msg">
Michal Privoznik provided some additional context:<br class="gmail_msg">
<br class="gmail_msg">
"Previously, libvirt merely just appended 'script=' onto qemu cmd line<br class="gmail_msg">
according to what <script path=''/> contained letting qemu execute the<br class="gmail_msg">
script. That was flawed from security POV (we don't want qemu to be<br class="gmail_msg">
allowed to execute anything) thus libvirt is executing the script now.<br class="gmail_msg">
However, we obviously forgot about this corner case."<br class="gmail_msg">
<br class="gmail_msg">
This actually apparently first appeared in v1.3.3-rc1~71, so it's not new in Libvirt 2.0.0 *but*:<br class="gmail_msg">
<br class="gmail_msg">
* The Ubuntu-based gate is apparently running v1.3.1 at the moment.<br class="gmail_msg">
* The RHEL 7.2 and aligned CentOS included v1.2.17.<br class="gmail_msg">
<br class="gmail_msg">
This is at least partially why this was not seen until recently,</blockquote><div><br></div><div>Thanks for pinning all of that down!<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> but it also seems like it might be specific to certain guest networking setup.</blockquote><div><br></div><div>Yes, there are only a few networking backends that use <interface type=ethernet>, I believe; mine is networking-calico, which uses VIF_TYPE_TAP; I think (from code reading) that the others are 'ivs', 'iovisor', 'midonet' and 'vrouter'.  (Although another thing to keep in mind here is that os-vif should soon be taking over this area of code - so any fixes in nova/virt/libvirt may also be needed in os-vif.)<br><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> You mentioned you have multiple interfaces attached to the guest, which VIF types and associated Neutron plugins are you using?<br class="gmail_msg"></blockquote><div><br></div><div>Note that the multiple interfaces issue is an additional one.  The empty path issue causes all VIF_TYPE_TAP tests to fail, whether with just a single VM interface, or multiple VM interfaces.  I fixed most of those by patching my Nova locally (as in <a href="https://review.openstack.org/#/c/411936">https://review.openstack.org/#/c/411936</a>), but am still seeing failures in tests with multiple interfaces, which I haven't yet investigated further.<br><br></div><div>Regards,<br></div><div>      Neil<br><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
Thanks,<br class="gmail_msg">
<br class="gmail_msg">
Steve<br class="gmail_msg">
<br class="gmail_msg">
__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
</blockquote></div></div>