Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Descriptionyalzhang@redhat.com
2018-06-21 04:49:35 UTC
Description of problem:
virt-xml-validate fail for parts of the built-in network filters
Version-Release number of selected component (if applicable):
libvirt-4.4.0-2.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.
# virsh nwfilter-dumpxml allow-arp
<filter name='allow-arp' chain='arp' priority='-500'>
<uuid>06ab02dc-4e10-4d07-94e6-cb7bb0e96524</uuid>
<rule action='accept' direction='inout' priority='500'/>
</filter>
# virsh nwfilter-dumpxml allow-arp > test.xml
# virt-xml-validate test.xml
test.xml:3: element rule: Relax-NG validity error : Expecting an element , got nothing
test.xml fails to validate
2. Same issue with
no-other-rarp-traffic
no-ip-spoofing
no-arp-mac-spoofing
no-arp-ip-spoofing
allow-ipv4
allow-incoming-ipv4
allow-arp
Actual results:
part of the network filter will fail to validate the xml
Expected results:
the xml the filter should validate successfully
Additional info:
# cat -n /usr/share/libvirt/schemas/nwfilter.rng
20 <element name="rule">
21 <ref name="rule-node-attributes"/>
22 <choice>
23 <element name="mac">
...
28 </element>
29 <element name="vlan">
...
34 </element>
35 <element name="stp">
....
Comment 2yalzhang@redhat.com
2018-06-21 04:50:36 UTC
Pushed upstream, will be in libvirt-4.5.0:
commit 17b4734288ced5c34b3157c7c240f88823cbbfed
Author: Laine Stump <laine>
Date: Thu Jun 21 02:07:17 2018 -0400
schema: allow a <rule> element with no subelements in a nwfilter
Comment 8yalzhang@redhat.com
2018-07-05 02:03:32 UTC
Test on libvirt-4.5.0-1.el7.x86_64, all nwfilter xml validates successfully
Get all the builtin nwfilter name in a file
# cat test
allow-arp
allow-dhcp
allow-dhcp-server
allow-incoming-ipv4
allow-ipv4
clean-traffic
no-arp-ip-spoofing
no-arp-mac-spoofing
no-arp-spoofing
no-ip-multicast
no-ip-spoofing
no-mac-broadcast
no-mac-spoofing
no-other-l2-traffic
no-other-rarp-traffic
qemu-announce-self
qemu-announce-self-rarp
Prepare a simple script as below:
# cat test.sh
#!/bin/bash
cat test | while read line
do
virsh nwfilter-dumpxml ${line} > /tmp/${line}.xml
virt-xml-validate /tmp/${line}.xml
done
validate all the nwfilter dumpxml file successfully.
# ./test.sh
/tmp/allow-arp.xml validates
/tmp/allow-dhcp.xml validates
/tmp/allow-dhcp-server.xml validates
/tmp/allow-incoming-ipv4.xml validates
/tmp/allow-ipv4.xml validates
/tmp/clean-traffic.xml validates
/tmp/no-arp-ip-spoofing.xml validates
/tmp/no-arp-mac-spoofing.xml validates
/tmp/no-arp-spoofing.xml validates
/tmp/no-ip-multicast.xml validates
/tmp/no-ip-spoofing.xml validates
/tmp/no-mac-broadcast.xml validates
/tmp/no-mac-spoofing.xml validates
/tmp/no-other-l2-traffic.xml validates
/tmp/no-other-rarp-traffic.xml validates
/tmp/qemu-announce-self.xml validates
/tmp/qemu-announce-self-rarp.xml validates
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.
https://access.redhat.com/errata/RHSA-2018:3113