Bug 1004364 - libvirt network schema isn't valid
libvirt network schema isn't valid
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
: 1004627 (view as bug list)
Depends On:
Blocks: 1004365
  Show dependency treegraph
Reported: 2013-09-04 09:39 EDT by Pavel Hrdina
Modified: 2014-06-17 20:55 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.1.1-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1004365 (view as bug list)
Last Closed: 2014-06-13 06:41:24 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 Pavel Hrdina 2013-09-04 09:39:41 EDT
Description of problem:
The network.rng schema isn't valid. There is missing element "nat" for "forward" element. The new features have been added by commits 905629f4 and 1716e7a6.

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

How reproducible:

Steps to Reproduce:
1. virsh net-dumpxml default > default.xml
2. virt-xml-validate default.xml network

Actual results:
Relax-NG validity error : Extra element forward in interleave
default.xml:4: element forward: Relax-NG validity error : Element network failed to validate content
default.xml fails to validate

Expected results:
default.xml validates
Comment 2 Jiri Denemark 2013-09-05 03:51:29 EDT
*** Bug 1004627 has been marked as a duplicate of this bug. ***
Comment 3 Ján Tomko 2013-09-05 08:00:57 EDT
Now fixed upstream:
commit 437b7944a81b648a15c657fef184f3bcd2427dac
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2013-09-05 11:08:38 +0200
Commit:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2013-09-05 13:45:49 +0200

    Add '<nat>' element to '<forward>' network schemas
    Commits 905629f4 and 1716e7a6 have added support for specifying
    an IPv4 range and a port range to be used by NAT:
    <forward mode='nat'>
        <address start='' end=''/>
        <port start='60000' end='65432'/>

git describe: v1.1.2-71-g437b794
Comment 5 Hu Jianwei 2013-09-09 02:33:04 EDT
The bug can reproduce on libvirt-1.1.1-3.el7, but can not reproduce on libvirt-1.1.1-4.el7.


Verified steps:

1. Dump virtual network xml
[root@localhost ~]# virsh net-dumpxml default > default.xml 
[root@localhost ~]# cat default.xml 
<network connections='1'>
  <forward mode='nat'>
      <port start='1024' end='65535'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:b7:53:19'/>
  <ip address='' netmask=''>
      <range start='' end='' />

2. Validate the xml using virt-xml-validate command
[root@localhost ~]# virt-xml-validate default.xml network
default.xml validates

3. Other scenario in changes of patch.
[root@localhost ~]# cat 1.xml 
  <bridge name="virbr0"/>
  <forward mode="nat" dev="eth1">
      <address start='' end=''/>
      <port start='60000' end='65432'/>
  <ip address="" netmask="">
      <range start="" end=""/>
      <host mac="00:16:3e:77:e2:ed" name="a.example.com" ip=""/>
      <host mac="00:16:3e:3e:a9:1a" name="b.example.com" ip=""/>
  <ip family="ipv4" address="" netmask="">
  <ip family="ipv6" address="2001:db8:ac10:fe01::1" prefix="64">
  <ip family="ipv6" address="2001:db8:ac10:fd01::1" prefix="64">
  <ip family="ipv4" address="">
[root@localhost ~]# virt-xml-validate 1.xml network
1.xml validates
We can get the expected results, so changed to verified.
Comment 6 Ludek Smid 2014-06-13 06:41:24 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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