Bug 1004627 - virt-xml-validate should succeed xml dumpxml from net-dumpxml
virt-xml-validate should succeed xml dumpxml from net-dumpxml
Status: CLOSED DUPLICATE of bug 1004364
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Libvirt Maintainers
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-05 01:24 EDT by EricLee
Modified: 2013-09-05 03:51 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-05 03:51:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description EricLee 2013-09-05 01:24:21 EDT
Description of problem:
virt-xml-validate should succeed xml dumpxml from net-dumpxml

Version-Release number of selected component (if applicable):
# rpm -qa libvirt qemu-kvm ; uname -r
qemu-kvm-1.5.3-2.el7.x86_64
libvirt-1.1.1-3.el7.x86_64
3.10.0-14.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes

# virsh net-dumpxml default > default.xml

# vim default.xml
<network connections='1'>
  <name>default</name>
  <uuid>107ae75e-cfb1-4e86-90a8-b145c44502df</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:1c:4f:78'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

# virt-xml-validate default.xml network
default.xml:5: element nat: Relax-NG validity error : Element forward has extra content: nat
Relax-NG validity error : Extra element forward in interleave
default.xml:1: element network: Relax-NG validity error : Element network failed to validate content
default.xml fails to validate

Actual results:
see description

Expected results:
should succeed

Additional info:
However, do net-dumpxml then virt-xml-validate in RHEL6.5 will succeed, and net-dumpxml gets no 'connections' and
    <nat>
      <port start='1024' end='65535'/>
    </nat>
in default.xml:
# vim default.xml
<network>
  <name>default</name>
  <uuid>d3e7c338-78b7-4a6c-b221-a115a48bb062</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:CA:89:0F'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

It is a new feature added in 1.0.3 according to:
http://libvirt.org/formatnetwork.html, but not modify virt-xml-validate correspondingly.
Comment 2 Jiri Denemark 2013-09-05 03:51:29 EDT

*** This bug has been marked as a duplicate of bug 1004364 ***

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