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 1408650 - Failed to add new bridge network interface with vlan interface as slave on rhel6.9
Summary: Failed to add new bridge network interface with vlan interface as slave on rh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.9
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-26 08:35 UTC by mxie@redhat.com
Modified: 2017-03-21 10:41 UTC (History)
9 users (show)

Fixed In Version: python-virtinst-0.600.0-31.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 10:41:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot (55.79 KB, image/png)
2016-12-26 08:35 UTC, mxie@redhat.com
no flags Details
virt-manager debug log (9.50 KB, application/octet-stream)
2016-12-26 08:36 UTC, mxie@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0685 0 normal SHIPPED_LIVE python-virtinst bug fix update 2017-03-21 12:37:21 UTC

Description mxie@redhat.com 2016-12-26 08:35:18 UTC
Created attachment 1235323 [details]
screenshot

Description of problem:
Failed to add new bridge network interface with vlan interface as slave on rhel6.9

Version-Release number of selected component (if applicable):
python-virtinst.noarch 0:0.600.0-30.el6    
libvirt-0.10.2-62.virtcov.el6.x86_64
virt-manager-0.9.0-33.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.499.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Make sure NetworkManager is stopped

# service NetworkManager stop

2. Define a vlan interface with virt-manager's GUI.
a) In virt-manager, open menu [Edit]->[Connection Details].
b) In "Network Interfaces" tab, click "+"(Add interface) to open interface
adding dialog.
c) Select "VLAN" as "Interface Type" and click "Forward".
d) Input "VLAN Tag" with value "2", choose eth0 as parent interface, start mode as "onboot",check "activate now"
e) Click "Finish" button to create the vlan interface.

3. Define a bridge interface with vlan interface as slave.
a) In virt-manager, open menu [Edit]->[Connection Details].
b) In "Network Interfaces" tab, click "+" button(Add interface) to open interface adding dialog.
c) Select "Bridge" as "Interface Type" and click "Forward".
d) Choose the vlan interface eth0.2 as parent interface, an uncheck "Enable STP", start mode as "onboot",check "activate now"
e) Click "Finish" button and select 'yes' to ensure create the vlan interface.


Actual results:
Will pop up below error dialog after step3, pls refer to screenshot

Error creating interface: 'Could not define interface: XML error: could not get interface XML description: XML invalid - Element interface failed to validate content


Expected results:
Add new bridge network interface with vlan interface as slave on rhel6.9 successfully

Additional info:
1.The problem will be fixed after downgrade python-virtinst.noarch to  0:0.600.0-29.el6, so this issue is a regression bug

Comment 1 mxie@redhat.com 2016-12-26 08:36:48 UTC
Created attachment 1235324 [details]
virt-manager debug log

Comment 5 yalzhang@redhat.com 2017-01-04 09:50:18 UTC
1. I can reproduce the issue with
python-virtinst.noarch 0:0.600.0-30.el6    
libvirt-0.10.2-62.el6.x86_64
virt-manager-0.9.0-33.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.499.el6.x86_64

2. And after I changed to python-virtinst.noarch 0:0.600.0-29.el6, the failure disappear.

3. I'm very confused as the command "virt-xml-validate" always fail when I use it the validate the interface xml, no matter in rhel6.9 or rhel7.

on rhel6.9 with libvirt-0.10.2-62.el6.x86_64 (eth0 is my physical interface)
# virsh iface-dumpxml eth0 > /tmp/eth0

# cat /tmp/eth0
<interface type='ethernet' name='eth0'>
  <mac address='44:37:e6:6a:7f:29'/>
  <protocol family='ipv4'>
    <ip address='10.66.4.x' prefix='22'/>
  </protocol>
  <protocol family='ipv6'>
    <ip address='fe80::4637:e6ff:fe6a:7f29' prefix='64'/>
  </protocol>
</interface>

# virt-xml-validate /tmp/eth0
/tmp/eth0:1: element interface: Relax-NG validity error : Expecting element start, got mac
/tmp/eth0:1: element interface: Relax-NG validity error : Element interface failed to validate content
/tmp/eth0:1: element interface: Relax-NG validity error : Element interface failed to validate attributes
/tmp/eth0 fails to validate

on rhel7 with libvirt-2.5.0-1.el7.x86_64
# virsh iface-dumpxml enp0s25 > /tmp/enp0s25

# cat /tmp/enp0s25
<interface type='ethernet' name='enp0s25'>
  <protocol family='ipv4'>
    <ip address='10.66.5.x' prefix='22'/>
  </protocol>
  <protocol family='ipv6'>
    <ip address='fe80::1e6f:65ff:fe06:bc81' prefix='64'/>
  </protocol>
  <link speed='1000' state='up'/>
  <mac address='1c:6f:65:06:bc:81'/>
</interface>

# virt-xml-validate /tmp/enp0s25
/tmp/enp0s25:1: element interface: Relax-NG validity error : Expecting an element start, got nothing
/tmp/enp0s25:1: element interface: Relax-NG validity error : Invalid sequence in interleave
/tmp/enp0s25:1: element interface: Relax-NG validity error : Element interface failed to validate content
/tmp/enp0s25 fails to validate

Q1: If the failure in step 1 is caused by the command "virt-xml-validate" issue in step 3? If it is yes, then why the failure disappear after downgrade python-virtinst?

Q2: As the /usr/share/libvirt/schemas/interface.rng is not referred by other RNG, when will the interface validation happen? 
I have tried some scenarios, 
only define an interface by "virsh iface-define" and create an interface on virt-manager will do the validation; 
start an interface by "virsh iface-start" or edit it by "virsh iface-edit" will not do the validation(no error pop up). If these are expected?

Comment 6 Pavel Hrdina 2017-01-05 14:53:47 UTC
(In reply to yalzhang from comment #5)
> Q1: If the failure in step 1 is caused by the command "virt-xml-validate"
> issue in step 3? If it is yes, then why the failure disappear after
> downgrade python-virtinst?

This is not caused by that command.  Python-virtinst simply creates an XML for the new interface and passes this XML to libvirt function from libvirt API.

That error is from netcf that is called by libvirt to create that interface.

Recent change that was trying to fix bridge on top of bond interface broke this, because netcf in RHEL-7 doesn't complain about XML validation.

> Q2: As the /usr/share/libvirt/schemas/interface.rng is not referred by other
> RNG, when will the interface validation happen? 
> I have tried some scenarios, 
> only define an interface by "virsh iface-define" and create an interface on
> virt-manager will do the validation; 
> start an interface by "virsh iface-start" or edit it by "virsh iface-edit"
> will not do the validation(no error pop up). If these are expected?

"virsh iface-edit" should error out if the XML is invalid, "virsh iface-start" doesn't need to validate the XML because you are not changing the XML

Comment 9 zhoujunqin 2017-01-12 09:12:34 UTC
I can reproduce this issue with package:
python-virtinst.noarch 0:0.600.0-30.el6    

Then try to verify this bug with new build:
python-virtinst-0.600.0-31.el6.noarch

Steps as comment 0, I can add new bridge network interface with vlan interface as slave on rhel6.9 successfully, so move this bug to VERIFIED.

Comment 11 errata-xmlrpc 2017-03-21 10:41:51 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.

https://rhn.redhat.com/errata/RHBA-2017-0685.html


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