yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60410
[Bug 1649527] Re: nova creates an invalid ethernet/bridge interface definition in virsh xml
** Also affects: centos
Importance: Undecided
Status: New
** No longer affects: centos
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1649527
Title:
nova creates an invalid ethernet/bridge interface definition in virsh
xml
Status in OpenStack Compute (nova):
In Progress
Bug 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
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1649527/+subscriptions
References