Bug 1473091 - <disk> <driver name=...> should be optional
<disk> <driver name=...> should be optional
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-19 21:55 EDT by Eric Blake
Modified: 2017-09-14 16:22 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-09-14 16:22:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eric Blake 2017-07-19 21:55:26 EDT
Description of problem:
Upgrading from Fedora 25 to Fedora 26 (older libvirt to libvirt-3.5.0-1.fc26.x86_64) broke several of my existing domains, which no longer validated according to XML.  This regression has already been fixed upstream, but needs to be backported to the Fedora build.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Update a domain's <disk> description to include a line like this:

     <disk type='file' device='disk'>
      <driver type='raw' cache='none'/>

Actual results:
virt-xml-validate refuses to accept it, where it used to be valid. Workaround: add name='qemu' as another attribute to <driver>

Expected results:
No regression

Additional info:
Fixed upstream by commit:
commit b494e09d058f09b48d0fd8855edd557101294671
Author: Jim Fehlig <jfehlig@suse.com>
Date:   Tue Jul 18 10:20:35 2017 -0600

    docs: schema: make disk driver name attribute optional
    /domain/devices/disk/driver/@name is not a required or mandatory
    attribute according to formatdomain, and indeed it was agreed on
    IRC that the attribute is "optional for input, recommended (but
    not required) for output". Currently the schema requires the
    attribute, causing virt-xml-validate to fail on disk config where
    the driver name is not explicitly specified. E.g.
    # cat test.xml | grep -A 5 cdrom
        <disk type='file' device='cdrom'>
          <driver type='raw'/>
          <target dev='hdb' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    # virt-xml-validate test.xml
    Relax-NG validity error : Extra element devices in interleave
    test.xml:21: element devices: Relax-NG validity error : Element domain failed to validate content
    test.xml fails to validate
    Relaxing the name attribute to be optional fixes the validation
    # virt-xml-validate test.xml
    test.xml validates
Comment 1 Fedora Update System 2017-08-04 16:52:03 EDT
libvirt-3.2.1-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3c92db10b8
Comment 2 Fedora Update System 2017-08-07 02:23:22 EDT
libvirt-3.2.1-5.fc26 has been pushed to the Fedora 26 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-2017-3c92db10b8
Comment 3 Fedora Update System 2017-08-23 04:16:48 EDT
libvirt-2.2.1-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-226cbd995b
Comment 4 Fedora Update System 2017-08-23 15:51:28 EDT
libvirt-3.2.1-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2017-08-23 20:53:30 EDT
libvirt-2.2.1-3.fc25 has been pushed to the Fedora 25 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.