Bug 1292131

Summary: Validation of XML with QEMU command line fails
Product: [Fedora] Fedora Reporter: Jaroslav Škarvada <jskarvad>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: agedosier, berrange, clalancette, dyuan, fjin, itamar, jforbes, jtomko, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.2.13.2-2.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-02 00:53:07 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 Jaroslav Škarvada 2015-12-16 14:45:11 UTC
Description of problem:
I need to use debugserver in QEMU, i.e. start QEMU with the '-s' command line parameter. I changed machine XML accordingly, but its validation fails. If validation is skipped it works correctly.

Version-Release number of selected component (if applicable):
libvirt-client-1.2.13.1-3.fc22.x86_64

How reproducible:
Always

Steps to Reproduce:
1. virsh edit DOMAIN
2. Edit the buffer to contain the following tags:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <qemu:commandline>
    <qemu:arg value='-s'/>
  </qemu:commandline>
3. Save

Actual results:
error:XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Expecting an element name, got nothing
Invalid sequence in interleave
Element domain failed to validate content

Expected results:
No error

Additional info:
It works correctly if the validation is skipped (the 'i' option from the prompt), and the settings are correctly saved. This can be verified by 'virsh dumpxml DOMAIN'.

Comment 1 Ján Tomko 2015-12-17 12:57:34 UTC
Proposed upstream patch:
https://www.redhat.com/archives/libvir-list/2015-December/msg00712.html

Comment 2 Ján Tomko 2016-01-05 12:55:04 UTC
Pushed upstream as:
commit b4e0549febe416ffefc16f389423740d6d65fa74
Author:     Ján Tomko <jtomko>
CommitDate: 2016-01-05 13:21:09 +0100

    schema: interleave domain name and uuid with other elements
    
    Allow <name> and <uuid> anywhere under <domain>, not just at the top:
    
    error:XML document failed to validate against schema: Unable to validate
    doc against /usr/share/libvirt/schemas/domain.rng
    Expecting an element name, got nothing
    Invalid sequence in interleave
    Element domain failed to validate content
    
    Introduced with the first RelaxNG schema in commit c642103.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1292131

git describe: v1.3.0-160-gb4e0549

Backported to v1.2.13-maint as: v1.2.13.2-1-g4be842d

Comment 3 Fedora Update System 2016-01-21 17:14:37 UTC
libvirt-1.2.13.2-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9508f1538a

Comment 4 Fedora Update System 2016-01-23 21:28:38 UTC
libvirt-1.2.13.2-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9508f1538a

Comment 5 Fedora Update System 2016-02-02 00:52:59 UTC
libvirt-1.2.13.2-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.