Bug 1292131 - Validation of XML with QEMU command line fails
Summary: Validation of XML with QEMU command line fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ján Tomko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-16 14:45 UTC by Jaroslav Škarvada
Modified: 2016-02-02 00:53 UTC (History)
12 users (show)

Fixed In Version: libvirt-1.2.13.2-2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-02 00:53:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.