Cloned from launchpad bug 1649527. Description: Description =========== https://github.com/openstack/nova/blob/master/nova/virt/libvirt/designer.py#L61 sets the script path of an ethernet interface to "" https://github.com/openstack/nova/blob/master/nova/virt/libvirt/config.py#L1228 checks script for None. As it is not none but a string it adds an empty script path to the ethernet interface definition in the virsh xml Steps to reproduce ================== nova generated virsh: [root@overcloud-novacompute-0 heat-admin]# cat 2.xml |grep tap -A5 -B3 <interface type='ethernet'> <mac address='02:b9:38:d2:ef:bf'/> <script path=''/> <target dev='tapb938d2ef-bf'/> <model type='virtio'/> <driver name='qemu'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> XML validation: [root@overcloud-novacompute-0 heat-admin]# virt-xml-validate 2.xml Relax-NG validity error : Extra element devices in interleave 2.xml:59: element devices: Relax-NG validity error : Element domain failed to validate content 2.xml fails to validate removing the <script path=''/> element the xml validation succeeds: [root@overcloud-novacompute-0 heat-admin]# cat 1.xml |grep tap -A5 -B2 <interface type='ethernet'> <mac address='02:b9:38:d2:ef:bf'/> <target dev='tapb938d2ef-bf'/> <model type='virtio'/> <driver name='qemu'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> [root@overcloud-novacompute-0 heat-admin]# virt-xml-validate 1.xml 1.xml validates Point is that libvirt <2.0.0 is more tolerant. libvirt 2.0.0 throws a segfault: Dec 9 13:30:32 comp1 kernel: libvirtd[1048]: segfault at 8 ip 00007fc9ff09e1c3 sp 00007fc9edfef1d0 error 4 in libvirt.so.0.2000.0[7fc9fef4b000+352000] Dec 9 13:30:32 comp1 journal: End of file while reading data: Input/output error Dec 9 13:30:32 comp1 systemd: libvirtd.service: main process exited, code=killed, status=11/SEGV Dec 9 13:30:32 comp1 systemd: Unit libvirtd.service entered failed state. Dec 9 13:30:32 comp1 systemd: libvirtd.service failed. Dec 9 13:30:32 comp1 systemd: libvirtd.service holdoff time over, scheduling restart. Dec 9 13:30:32 comp1 systemd: Starting Virtualization daemon... Dec 9 13:30:32 comp1 systemd: Started Virtualization daemon. Expected result =============== VM can be started instead of checking for None, config.py should check for an empty string before adding script path Actual result ============= VM doesn't start Environment =========== OSP10/Newton, libvirt 2.0.0 Specification URL (additional information): https://bugs.launchpad.net/nova/+bug/1649527
There is some additional context here: http://lists.openstack.org/pipermail/openstack-dev/2016-December/109401.html It seems like there are at least two aspects at play here: 1) Stop Nova generating XML with path=''. 2) Re-mediation for guests that already have this.
From upstream conversation this would seem to impact at least the 'ivs', 'iovisor', 'midonet' and 'vrouter' plugins. We also need to ensure we fix not just in-tree but also in os-vif.
*** Bug 1422278 has been marked as a duplicate of this bug. ***
Verified as follows, ********* VERSION ********* [heat-admin@compute-0 ~]$ yum list installed | grep openstack-nova openstack-nova-api.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-cert.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-common.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-compute.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-conductor.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-console.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-novncproxy.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed openstack-nova-scheduler.noarch 1:14.0.3-8.el7ost @rhos-10.0-signed ***** LOGS ***** [heat-admin@compute-0 ~]$ sudo virsh list --all Id Name State ---------------------------------------------------- 1 instance-00000001 running [heat-admin@compute-0 ~]$ sudo virsh dumpxml 1 . .. ... <interface type='bridge'> <mac address='fa:16:3e:31:c7:0b'/> <source bridge='qbrba0f5a90-1a'/> <target dev='tapba0f5a90-1a'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ... .. . [heat-admin@compute-0 ~]$ sudo virsh dumpxml 1 > 1.xml [heat-admin@compute-0 ~]$ virt-xml-validate 1.xml 1.xml validates
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0319.html