Bug 1173468
Summary: | Domain configure xml validation fails when adding <link state='down'/> to network interface | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | vivian zhang <vivianzhang> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, honzhang, mzhan, pkrempa, rbalakri |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.14-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:58:13 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
vivian zhang
2014-12-12 08:36:20 UTC
Fixed upstream: commit 8eb907b8d0fd73c8f88f9cd8df1fa0e7abf40c93 Author: Peter Krempa <pkrempa> Date: Mon Mar 2 17:21:23 2015 +0100 schema: Fix interface link state schema In commit edd1295e1da6bfe8e4e257e5fbfad71ac0bf7c87 I've introduced an XML element that allows to configure state of the network interface link. Somehow the RNG schema hunk ended up in a weird place in the network schema definition. Move it to the right place and add a test case. Note that the link state is set up via the monitor at VM startup so I originally didn't think of adding a test case. v1.2.13-34-g8eb907b [root@localhost images]# virsh start rhel7.0 Domain rhel7.0 started [root@localhost images]# virsh dumpxml rhel7.0 > rhel7.0.xml [root@localhost images]# virt-xml-validate rhel7.0.xml Relax-NG validity error : Extra element devices in interleave rhel7.0.xml:1: element domain: Relax-NG validity error : Element domain failed to validate content rhel7.0.xml fails to validate [root@localhost images]# cat rhel7.0.xml <domain type='kvm' id='8'> <name>rhel7.0</name> <uuid>238d05f9-42e2-4f10-83ef-80c2121fecee</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static' current='4'>8</vcpu> <cputune> <vcpupin vcpu='3' cpuset='3'/> </cputune> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>SandyBridge</model> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/rhel7.0.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='ide' index='0'> <alias name='ide'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <interface type='network'> <mac address='52:54:00:68:ce:60'/> <source network='default' bridge='virbr0'/> <target dev='vnet0'/> <model type='virtio'/> <link state='down'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0' state='disconnected'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> </redirdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir1'/> </redirdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='selinux' relabel='yes'> <label>system_u:system_r:svirt_t:s0:c499,c851</label> <imagelabel>system_u:object_r:svirt_image_t:s0:c499,c851</imagelabel> </seclabel> </domain> It is still failed even if removing the sub elements under the <interface> one by one.It can be passed until removing the whole <interface> element. [root@localhost images]# vim rhel7.0.xml [root@localhost images]# cat rhel7.0.xml |grep interface [root@localhost images]# virt-xml-validate rhel7.0.xml rhel7.0.xml validates The failure you see is unrelated to this bug report. The XML validator complains that the 'bridge' attribute is unexpected in the source element. The bug is tracked as https://bugzilla.redhat.com/show_bug.cgi?id=1177594 <source network='default' bridge='virbr0'/> Please choose a different source element or wait until the above BZ is fixed. Remove the bridge attribute from source element because of bug1177594. The result is expected. Move its status to VERIFIED. # rpm -q libvirt libvirt-1.2.17-6.el7.x86_64 # cat r7.1.xml|grep /interface -B10 <interface type='network'> <mac address='52:54:00:5a:ab:c5'/> <source network='default'/> <bandwidth> <inbound average='1000' peak='5000' floor='200' burst='1024'/> <outbound average='128' peak='256' burst='256'/> </bandwidth> <link state='down'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> # virt-xml-validate r7.1.xml r7.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-2015-2202.html |