RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1004365 - libvirt network schema isn't valid
Summary: libvirt network schema isn't valid
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1004364
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 13:41 UTC by Pavel Hrdina
Modified: 2013-11-21 09:10 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.10.2-24.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1004364
Environment:
Last Closed: 2013-11-21 09:10:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1581 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2013-11-21 01:11:35 UTC

Description Pavel Hrdina 2013-09-04 13:41:01 UTC
+++ This bug was initially created as a clone of Bug #1004364 +++

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):
upstream

How reproducible:
100%

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 Ján Tomko 2013-09-05 12:01:02 UTC
Now fixed upstream:
commit 437b7944a81b648a15c657fef184f3bcd2427dac
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-09-05 11:08:38 +0200
Commit:     Ján Tomko <jtomko>
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'>
      <nat>
        <address start='10.20.30.40' end='10.20.30.44'/>
        <port start='60000' end='65432'/>
      </nat>
    </forward>
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1004364

git describe: v1.1.2-71-g437b794

Comment 5 chhu 2013-09-10 03:43:02 UTC
Reproduced with libvirt-0.10.2-23.el6.x86_64.

Verified with the packages:
libvirt-0.10.2-24.el6.x86_64
qemu-kvm-0.12.1.2-2.400.el6.x86_64

Test steps:
1. # cat n1.xml
<network connections='1'>
  <name>default</name>
  <uuid>ba6533c2-da83-4e95-bf35-5dac8ab3beee</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:b7:53:29'/>
  <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>

2. # virt-xml-validate n1.xml network
n1.xml validates

3. # cat n2.xml
<network>
  <name>default</name>
  <uuid>822f0d90-c91e-6742-64da-4a736edb9a9b</uuid>
  <bridge name="virbr0"/>
  <forward mode="nat" dev="eth1">
    <nat>
      <address start='10.20.30.40' end='10.20.30.44'/>
      <port start='60000' end='65432'/>
    </nat>
  </forward>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254"/>
      <host mac="00:16:3e:77:f2:ed" name="a.example.com" ip="192.168.122.10"/>
      <host mac="00:16:3e:3e:a2:1a" name="b.example.com" ip="192.168.122.11"/>
    </dhcp>
  </ip>
  <ip family="ipv4" address="192.168.123.1" netmask="255.255.255.0">
  </ip>
  <ip family="ipv6" address="2001:db8:ac10:fe01::1" prefix="64">
  </ip>
  <ip family="ipv6" address="2001:db8:ac10:fd01::1" prefix="64">
  </ip>
  <ip family="ipv4" address="10.24.10.1">
  </ip>
</network>

4. # virt-xml-validate n2.xml network
n2.xml validates

Test results:
current command works well, change the status to verified.

Comment 7 errata-xmlrpc 2013-11-21 09:10:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1581.html


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