nova creates an invalid ethernet/bridge interface definition in virsh xml
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Nell Jerram | ||
Newton |
Fix Committed
|
Medium
|
Roman Podoliaka |
Bug Description
Description
===========
https:/
sets the script path of an ethernet interface to ""
https:/
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
<interface type='ethernet'>
<mac address=
<script path=''/>
<target dev='tapb938d2e
<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
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
<interface type='ethernet'>
<mac address=
<target dev='tapb938d2e
<model type='virtio'/>
<driver name='qemu'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
[root@overcloud
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.
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
summary: |
- nova creates and invalid ethernet interface definition in virsh xml + nova creates an invalid ethernet interface definition in virsh xml |
summary: |
- nova creates an invalid ethernet interface definition in virsh xml + nova creates an invalid ethernet/bridge interface definition in virsh + xml |
Changed in nova: | |
assignee: | nobody → Michael Henkel (mhenkel-3) |
Changed in nova: | |
assignee: | Michael Henkel (mhenkel-3) → Neil Jerram (neil-jerram) |
status: | New → In Progress |
Changed in nova: | |
status: | Confirmed → In Progress |
tags: | added: libvirt |
no longer affects: | centos |
Changed in nova: | |
assignee: | Neil Jerram (neil-jerram) → Stephen Gordon (sgordon) |
Changed in nova: | |
importance: | Undecided → Medium |
In addition, there is the complication that operators now have many existing VMs which have been created with the script path="" directive that Libvirt will refuse to recognize.