Bug 1172028

Summary: Failed to add new bridge network interface on host via virt-manager
Product: Red Hat Enterprise Linux 7 Reporter: zhoujunqin <juzhou>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: codong, dyuan, gscrivan, liye, mzhan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.1.0-10.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:07:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screeshot png none

Description zhoujunqin 2014-12-09 09:15:35 UTC
Description of problem:
Failed to add new bridge network interface on host via virt-manager

Version-Release number of selected component (if applicable):
libvirt-1.2.8-10.el7.x86_64
virt-manager-1.1.0-9.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Make sure NetworkManager is stopped
# service NetworkManager stop
2. Launch virt-manager: #virt-manager.
3. Click Edit->Host Details.
4. Click Network Interfaces tab on Host Details dialogue.
5. Click + button.
6. Select interface type as 'Bridge', click Forward button.
7. Fill the name as 'br1', select start mode as 'onboot', enable activate now, choose 'eno1' to bridge. Click Finish button.

Actual results:
After click finish button, a error message box showed:
Error creating interface: 'Could not define interface: XML error: could not get interface XML description: XML invalid - Element interface has extra content: link
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createinterface.py", line 1124, in do_install
    self.interface.install(meter, create=activate)
  File "/usr/share/virt-manager/virtinst/interface.py", line 257, in install
    raise RuntimeError(_("Could not define interface: %s" % str(e)))


Expected results:
Can add new bridge successfully.

Additional info:
1. Following is virt-manager debug info.
# virt-manager --debug 
[Tue, 09 Dec 2014 15:04:25 virt-manager 10606] DEBUG (interface:252) Creating interface 'br1' with xml:
<interface type="bridge" name="br1">
  <bridge stp="off" delay="0.0">
    <interface type="ethernet" name="eno1">
      <protocol family="ipv4">
        <ip address="10.66.4.104" prefix="22"/>
      </protocol>
      <protocol family="ipv6">
        <ip address="fe80::4637:e6ff:fe61:3663" prefix="64"/>
      </protocol>
      <link speed="1000" state="up"/>
      <mac address="44:37:e6:61:36:63"/>
    </interface>
  </bridge>
  <protocol family="ipv4">
      <ip address="10.66.4.104" prefix="22"/>
    </protocol>
  <protocol family="ipv6">
      <ip address="fe80::4637:e6ff:fe61:3663" prefix="64"/>
    </protocol>
  <start mode="onboot"/>
</interface>

[Tue, 09 Dec 2014 15:04:25 virt-manager 10606] DEBUG (error:80) error dialog message:
summary=Error creating interface: 'Could not define interface: XML error: could not get interface XML description: XML invalid - Element interface has extra content: link
'
details=Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createinterface.py", line 1124, in do_install
    self.interface.install(meter, create=activate)
  File "/usr/share/virt-manager/virtinst/interface.py", line 257, in install
    raise RuntimeError(_("Could not define interface: %s" % str(e)))
RuntimeError: Could not define interface: XML error: could not get interface XML description: XML invalid - Element interface has extra content: link


2.
virsh # iface-dumpxml eno1
<interface type='ethernet' name='eno1'>
  <protocol family='ipv4'>
    <ip address='10.66.4.104' prefix='22'/>
  </protocol>
  <protocol family='ipv6'>
    <ip address='fe80::4637:e6ff:fe61:3663' prefix='64'/>
  </protocol>
  <link speed='1000' state='up'/>
  <mac address='44:37:e6:61:36:63'/>
</interface>

Comment 4 zhoujunqin 2014-12-10 09:10:45 UTC
Try to verify it with new build:
virt-manager-1.1.0-10.el7.noarch

steps:
1. Make sure NetworkManager is stopped
# service NetworkManager stop
2. Launch virt-manager: #virt-manager.
3. Click Edit->Host Details.
4. Click Network Interfaces tab on Host Details dialogue.
5. Click + button.
6. Select interface type as 'Bridge', click Forward button.
7. Fill the name as 'br1', select start mode as 'onboot', enable activate now, choose 'eno1' to bridge. Click Finish button.

# virt-manager --debug
[Wed, 10 Dec 2014 10:04:44 virt-manager 15293] DEBUG (createinterface:121) Showing new interface wizard
[Wed, 10 Dec 2014 10:04:48 virt-manager 15293] DEBUG (createinterface:131) Showing new interface bridge config
[Wed, 10 Dec 2014 10:05:58 virt-manager 15293] DEBUG (interface:252) Creating interface 'br1' with xml:
<interface type="bridge" name="br1">
  <bridge stp="off" delay="0.0">
    <interface type="ethernet" name="eno1">
      <start mode="onboot"/>
      <protocol family="ipv4">
        <dhcp/>
      </protocol>
      <protocol family="ipv6">
      </protocol>
    </interface>
  </bridge>
  <protocol family="ipv4">
      <ip address="10.66.4.104" prefix="22"/>
    </protocol>
  <protocol family="ipv6">
      <ip address="fe80::4637:e6ff:fe61:3663" prefix="64"/>
    </protocol>
  <start mode="onboot"/>
</interface>

[Wed, 10 Dec 2014 10:06:01 virt-manager 15293] DEBUG (createinterface:1135) Install completed
[Wed, 10 Dec 2014 10:06:01 virt-manager 15293] DEBUG (createinterface:140) Closing new interface wizard
[Wed, 10 Dec 2014 10:06:01 virt-manager 15293] DEBUG (connection:1230) interface=eno1 removed
[Wed, 10 Dec 2014 10:06:01 virt-manager 15293] DEBUG (connection:1234) interface=br1 added


Result: New bridge can be added on host successfully.

8. New bridge "br1" can be stop and delete successfully.

But Giuseppe Scrivano, i have some doubt that the new bridge br1 has no MAC  showed on virt-manager display, but the common "eno1" has MAC address showing, i'm not sure whether it is designed or not, please help me check it, thanks.

Comment 5 zhoujunqin 2014-12-10 09:13:56 UTC
Created attachment 966707 [details]
screeshot png

Comment 6 Giuseppe Scrivano 2014-12-10 10:08:24 UTC
that is correct, as the MAC address is related to the ethernet adapter not the bridge itself.

Comment 7 zhoujunqin 2014-12-10 10:35:02 UTC
(In reply to Giuseppe Scrivano from comment #6)
> that is correct, as the MAC address is related to the ethernet adapter not
> the bridge itself.

Thanks for your confirmation, move this bug to VERIFIED.

Comment 9 errata-xmlrpc 2015-03-05 10:07:40 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-2015-0427.html