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 1067062 - virt-manager: could not build physical interface via libvirt
Summary: virt-manager: could not build physical interface via libvirt
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: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 994871 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-19 15:21 UTC by Eduard Barrera
Modified: 2014-10-14 04:20 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.2-36.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 04:20:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error screenshot (73.52 KB, image/png)
2014-02-19 15:21 UTC, Eduard Barrera
no flags Details
libvirt and network-scripts (50.39 KB, application/x-gzip)
2014-02-19 15:23 UTC, Eduard Barrera
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1374 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2014-10-14 08:11:54 UTC

Description Eduard Barrera 2014-02-19 15:21:35 UTC
Created attachment 865114 [details]
error screenshot

Description of problem:

When tryint to add a new network interface I'm getting the following error:

Could not build physical interface list via libvirt: An error occurred, but the cause is unknown



Version-Release number of selected component (if applicable):
 
RHEL 6.5
virt-manager-0.0.0-19.el6.x86_64


How reproducible:
100%


Steps to Reproduce:
1.
2.
3.

Actual results:

Could not build physical interface list via libvirt: An error occurred, but the cause is unknown

Only showing the default

Expected results:
A list of interfaces showing the bridge we created through network-scripts




Additional info:

Comment 1 Eduard Barrera 2014-02-19 15:23:26 UTC
Created attachment 865116 [details]
libvirt and network-scripts

Configuration used to reproduce the problem

Comment 2 Eduard Barrera 2014-02-19 15:26:55 UTC
How to reproduce the problem:

1.- copy ifcfg-eth* ifcfg-bond0 and ifcfg-rhevm to a rhel65 image.

2.- open virt-manager

3.- go connection details->Network interfaces, change rhevm to onboot

Comment 3 Eduard Barrera 2014-02-19 15:37:04 UTC
removing the miimon=100 option from ifcfg-bond0 solves the problem.

Comment 6 Giuseppe Scrivano 2014-02-20 17:05:51 UTC
I could reproduce the bug here, I'll get back to you when I have more information about it

Comment 7 Giuseppe Scrivano 2014-02-21 14:01:15 UTC
the error is generated by libvirt.  I can reproduce it also invoking directly "virsh":

# virsh iface-dumpxml --inactive rhevm
error: An error occurred, but the cause is unknown

Comment 8 Jiri Denemark 2014-02-24 07:11:18 UTC
This was addressed in netcf in Fedora and RHEL-7.

Comment 9 Eduard Barrera 2014-02-24 10:41:23 UTC
Is there any workarround ?

Comment 10 Jiri Denemark 2014-02-24 13:06:18 UTC
Oops, my brain was not apparently fully booted when I saw this bug today morning :-) I confused this bug with another bug that was caused by missing bridge-utils on the host. This seems to be something else so I don't know if it was already fixed or not. But anyway, it is likely this will need to be fixed in netcf, so I keep it there. And Laine would be working on it even if it was a libvirt bug.

Comment 11 Laine Stump 2014-03-03 09:48:48 UTC
This was actually a bug in libvirt, not netcf. It was fixed upstream in v1.0.4. I'm switching the component back to libvirt. There is no workaround, btw, other than to manually create/modify operations on interfaces that include a bond with miimon.)

commit 5ba077dcd0775d5fc5b8d3691c0a68b46e44ff9e
Author: Jim Fehlig <jfehlig>
Date:   Thu Mar 21 15:44:11 2013 -0600

    Fix parsing of bond interface XML
    
    Noticed that parsing bond interface XML containing the miimon element
    fails
    
      <interface type="bond" name="bond0">
        ...
        <bond mode="active-backup">
          <miimon freq="100" carrier="netif"/>
          ...
        </bond>
      </interface>
    
    This configuration does not contain the optional updelay and downdelay
    attributes, but parsing will fail due to returning the result of
    virXPathULong (a -1 when the attribute doesn't exist) from
    virInterfaceDefParseBond after examining the updelay attribute.
    
    While fixing this bug, cleanup the function to use virXPathInt instead
    of virXPathULong, and store the result directly instead of using a tmp
    variable.  Using virXPathInt actually fixes a potential silent
    truncation bug noted by Eric Blake.
    
    Also, there is no cleanup in the error label.  Remove the label,
    returning failure where failure occurs and success if the end of the
    function is reached.

Comment 15 Laine Stump 2014-04-14 11:00:20 UTC
*** Bug 994871 has been marked as a duplicate of this bug. ***

Comment 18 hongming 2014-05-20 06:32:00 UTC
Verify it using libvirt-0.10.2-36.el6.x86_64. The result is expected. Move its status to VERIFIED. 


[root@sriov2 ~]# rpm -q libvirt
libvirt-0.10.2-36.el6.x86_64

[root@sriov2 ~]# cat rhevm.xml 
<interface type='bridge' name='rhevm'>
  <start mode='onboot'/>
  <protocol family='ipv4'>
   <dhcp/>
  </protocol>
  <bridge stp='off'>
    <interface type='bond' name='bond0'>
      <bond mode='active-backup'>
        <miimon freq='100' carrier='netif'/>
        <interface type='ethernet' name='eth5'>
        </interface>
        <interface type='ethernet' name='eth1'>
        </interface>
      </bond>
    </interface>
  </bridge>
</interface>

[root@sriov2 ~]# virsh iface-define rhevm.xml
Interface rhevm defined from rhevm.xml

[root@sriov2 ~]# virsh iface-dumpxml rhevm
<interface type='bridge' name='rhevm'>
  <protocol family='ipv4'>
    <ip address='10.66.4.147' prefix='22'/>
  </protocol>
  <protocol family='ipv6'>
    <ip address='fe80::21b:21ff:fe55:b3b8' prefix='64'/>
  </protocol>
  <bridge>
    <interface type='bond' name='bond0'>
      <bond>
        <interface type='ethernet' name='eth1'>
          <mac address='00:1b:21:55:b3:b8'/>
        </interface>
        <interface type='ethernet' name='eth2'>
          <mac address='00:1b:21:55:b3:b8'/>
        </interface>
        <interface type='ethernet' name='eth5'>
          <mac address='00:1b:21:55:b3:b8'/>
        </interface>
      </bond>
    </interface>
  </bridge>
</interface>

[root@sriov2 ~]# virsh iface-destroy rhevm
Interface rhevm destroyed

[root@sriov2 ~]# virsh iface-start rhevm
Interface rhevm started

[root@sriov2 ~]# virsh iface-dumpxml rhevm --inactive
<interface type='bridge' name='rhevm'>
  <start mode='onboot'/>
  <protocol family='ipv4'>
    <dhcp/>
  </protocol>
  <bridge stp='off'>
    <interface type='bond' name='bond0'>
      <bond mode='active-backup'>
        <miimon freq='100' carrier='netif'/>
        <interface type='ethernet' name='eth5'>
        </interface>
        <interface type='ethernet' name='eth1'>
        </interface>
      </bond>
    </interface>
  </bridge>
</interface>

[root@sriov2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-rhevm
DEVICE=rhevm
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=dhcp
STP=off

[root@sriov2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BONDING_OPTS="mode=active-backup primary=eth5 miimon=100 use_carrier=1"
BRIDGE=rhevm

[root@sriov2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth5
DEVICE=eth5
ONBOOT=yes
MASTER=bond0
SLAVE=yes

[root@sriov2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
MASTER=bond0
SLAVE=yes

[root@sriov2 ~]# ping -c5 google.com -I rhevm
PING google.com (173.194.127.100) from 10.66.4.147 rhevm: 56(84) bytes of data.
64 bytes from hkg03s12-in-f4.1e100.net (173.194.127.100): icmp_seq=1 ttl=52 time=54.8 ms
64 bytes from hkg03s12-in-f4.1e100.net (173.194.127.100): icmp_seq=2 ttl=52 time=50.9 ms
64 bytes from hkg03s12-in-f4.1e100.net (173.194.127.100): icmp_seq=3 ttl=52 time=49.7 ms
64 bytes from hkg03s12-in-f4.1e100.net (173.194.127.100): icmp_seq=4 ttl=52 time=49.1 ms
64 bytes from hkg03s12-in-f4.1e100.net (173.194.127.100): icmp_seq=5 ttl=52 time=50.3 ms

--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4055ms
rtt min/avg/max/mdev = 49.188/51.040/54.869/2.024 ms

Comment 20 errata-xmlrpc 2014-10-14 04:20:31 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-2014-1374.html


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