Bug 911806 - virsh iface-bridge fails when ifcfg file does not contain DEVICE= , though NAME= is available
Summary: virsh iface-bridge fails when ifcfg file does not contain DEVICE= , though NA...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: netcf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Laine Stump
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1065396 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-16 02:56 UTC by Dave Allan
Modified: 2016-07-19 10:06 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 10:06:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dave Allan 2013-02-16 02:56:36 UTC
I just tried to set up a bridge with virsh iface-bridge and got the following error:

# virsh iface-bridge em1 br0
error: An error occurred, but the cause is unknown

Laine suggested on IRC that perhaps my ifcfg for em1 didn't contain a DEVICE= line, which turned out to be the problem.

The ifcfg file was similar to:

HWADDR=B4:B5:2F:5B:F4:24
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=em3
UUID=fd0f3dd7-54a8-42ae-a13f-137d0972a56d
ONBOOT=yes

Comment 1 Dave Allan 2013-02-16 02:58:11 UTC
The failure can be worked around by adding the line:

DEVICE=em3

to the ifcfg file.

Comment 2 Kashyap Chamarthy 2013-02-19 04:57:15 UTC
On a stock F18, there isn't even an ifcfg file for the interface when using wired connection. Please see below.

I only see ifcfg-lo for the loopback


=> Version info:
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# rpm -q netcf libvirt-daemon-kvm NetworkManager
netcf-0.2.3-1.fc18.x86_64
libvirt-daemon-kvm-1.0.2-2.fc18.x86_64
NetworkManager-0.9.7.997-2.fc18.x86_64
[root@vtestenglabpnqredhatcom ~]#
#------------------------------------------------------------#

=> ifconfig
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet ww.xx.yyy.zzz  netmask 255.255.255.0  broadcast xx.xx.xxx.xxx
        inet6 fe80::21f:16ff:fe14:f6d2  prefixlen 64  scopeid 0x20<link>
        inet6 2620:52:0:41c9:21f:16ff:fe14:f6d2  prefixlen 64  scopeid 0x0<global>
        ether 00:1f:16:14:f6:d2  txqueuelen 1000  (Ethernet)
        RX packets 585686  bytes 67399161 (64.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24166  bytes 1951074 (1.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf2600000-f2620000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 4  bytes 276 (276.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 276 (276.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet aaa.bbb.ccc.d  netmask 255.255.255.0  broadcast xxx.xxx.xxx.xxx
        ether 52:54:00:d1:ac:e0  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 1316 (1.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@vtestenglabpnqredhatcom ~]#
#------------------------------------------------------------#

=> Ensure, NetworkManager is enabled, and classic network scripts are disabled
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# systemctl is-enabled NetworkManager.service
enabled
[root@vtestenglabpnqredhatcom ~]# systemctl is-enabled network.service
network.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig network --level=5
disabled
[root@vtestenglabpnqredhatcom ~]#
#------------------------------------------------------------#

=> Contents in /etc/sysconfig/network-scripts :
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# ls /etc/sysconfig/network-scripts/
ifcfg-lo             ifdown-eth   ifdown-post    ifdown-tunnel  ifup-eth   ifup-isdn
ifup-ppp     ifup-wireless
ifcfg-Red_Hat_Guest  ifdown-ippp  ifdown-ppp     ifup           ifup-ippp  ifup-plip
ifup-routes  init.ipv6-global
ifdown               ifdown-ipv6  ifdown-routes  ifup-aliases   ifup-ipv6  ifup-plusb
ifup-sit     network-functions
ifdown-bnep          ifdown-isdn  ifdown-sit     ifup-bnep      ifup-ipx   ifup-post
ifup-tunnel  network-functions-ipv6
[root@vtestenglabpnqredhatcom ~]#
#------------------------------------------------------------#

=> brctl show
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# brctl show
bridge name	bridge id		STP enabled	interfaces
virbr0		8000.525400d1ace0	yes		virbr0-nic
[root@vtestenglabpnqredhatcom ~]#
#------------------------------------------------------------#

=> Let's save the current network configuration:
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# virsh iface-begin
Network config change transaction started

[root@vtestenglabpnqredhatcom ~]#

#------------------------------------------------------------#

=> Attempt to create a bridge device br0 & attach it to interface eth0
#------------------------------------------------------------#
[root@vtestenglabpnqredhatcom ~]# virsh iface-bridge eth0 br0
error: failed to get interface 'eth0'
error: internal error couldn't find interface named 'eth0': unspecified error - errors in
loading some config files

[root@vtestenglabpnqredhatcom ~]#
#------------------------------------------------------------#

Comment 3 Kashyap Chamarthy 2013-05-06 12:36:30 UTC
Update:

With the below versions:
#-------------#
$ rpm -q netcf libvirt-daemon-kvm qemu-kvm
netcf-0.2.3-4.fc19.x86_64
libvirt-daemon-kvm-1.0.5-2.fc19.x86_64
qemu-kvm-1.4.1-1.fc19.x86_64
#-------------#


= Attempt to configure bridging =
#-------------#
$ brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.52540031df08       yes             virbr0-nic
#-------------#
$ virsh iface-begin
#-------------#
$ virsh iface-bridge ksdev0 br0
Created bridge br0 with attached device ksdev0


error: Failed to start bridge interface br0
error: internal error failed to create (start) interface br0: failed to execute external program - Running 'ifup br0' failed with exit code 3: Error: Timeout 90 sec expired.
#-------------#

Before I debug further, is this a known issue? Any workarounds?

Comment 4 Kashyap Chamarthy 2013-05-06 12:55:50 UTC
Some more info:

Just for information, I ran:

#-------------#
$ brctl show
bridge name     bridge id               STP enabled     interfaces
br0             0080.000000000000       yes
virbr0          8000.52540031df08       yes             virbr0-nic
#-------------#
$ ifconfig
br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::20e4:5dff:fede:9e09  prefixlen 64  scopeid 0x20<link>
        ether 22:e4:5d:de:9e:09  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1  bytes 90 (90.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ksdev0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet ww.xx.yy.zzz  netmask 255.255.zzz.0  broadcast bb.cc.dd.zzz
        inet6 fe80::213:20ff:fefb:6ac3  prefixlen 64  scopeid 0x20<link>
        inet6 aaaa:52:0:102f:213:20ff:fefb:6ac3  prefixlen 64  scopeid 0x0<global>
        ether 00:13:20:fb:6a:c3  txqueuelen 1000  (Ethernet)
        RX packets 127904  bytes 16966409 (16.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2444  bytes 457685 (446.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xc2700000-c2720000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 64  bytes 6944 (6.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64  bytes 6944 (6.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:31:df:08  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 1289 (1.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
#-------------#

As it can be noticed, 'brctl' doesn't bind the bridge to the ksdev0 interface (eth0 alternative, in this case) :

And oh, the error in comment #3 appears to be a known issue, recently filed -- https://bugzilla.redhat.com/show_bug.cgi?id=919625

Comment 5 Cole Robinson 2013-12-16 19:47:23 UTC
On F20 there's a nicely reported error at least:

Interface not found: couldn't find interface named '/etc/sysconfig/network-scripts/ifcfg-p12p1'

$ sudo cat /etc/sysconfig/network-scripts/ifcfg-p12p1 
HWADDR=00:14:D1:25:50:79
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=p12p1
UUID=257e45ea-82e8-4a8e-b2c7-80188e236608
ONBOOT=no

So there's a NAME field but I don't know if that's sufficient.

Comment 6 Laine Stump 2013-12-17 15:01:48 UTC
The problem is that netcf was designed with the assumption that the name of the ifcfg file would match the name of the device, and that the DEVICE parameter would be set in any ifcfg file. The NAME field is actually unused by netcf.

NM and anaconda have a different (and changing) view of those three items. According to them:

1) None of these three items need to match

2) the DEVICE field in the file is unnecessary, and possibly even evil.

In recent versions of Fedora, they not only say that the name of the ifcfg file and the descriptive name of the interface (NAME) *can* be different, but they go out of their way to make sure that they *are* different. I don't recall the details right now, but I recall having an F20 install where the default settings gave me a completely different NAME, DEVICE, and ifcfg-*.

So I suppose what is needed is to provide settings for all three of those in the interface XML, then wait to see what behavior they change next (or alternately just give up :-/)

Comment 7 Laine Stump 2014-05-14 09:23:12 UTC
*** Bug 1065396 has been marked as a duplicate of this bug. ***

Comment 9 Fedora End Of Life 2015-05-29 08:53:44 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Laine Stump 2015-05-29 17:06:18 UTC
This is still an issue, and the more reminders there are around to nag me about it, the more likely I am to fix it someday, so I'll move it to F22.

Comment 11 Fedora End Of Life 2016-07-19 10:06:54 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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