Bug 1051401 - NetworkManager does not add slaves to new bridge
Summary: NetworkManager does not add slaves to new bridge
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 22
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-10 08:47 UTC by Frederic Grelot
Modified: 2015-12-15 15:44 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-15 15:44:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Frederic Grelot 2014-01-10 08:47:38 UTC
Description of problem:
When creating a bridge using the graphical interface, the bridge is not added to the connection, so it doesn't set up.

Version-Release number of selected component (if applicable):
NetworkManager-openvpn-gnome-0.9.8.2-3.fc20.x86_64
NetworkManager-l2tp-0.9.8-4.fc20.x86_64
NetworkManager-0.9.9.0-22.git20131003.fc20.x86_64
NetworkManager-pptp-0.9.8.2-3.fc20.x86_64
NetworkManager-vpnc-gnome-0.9.8.2-2.fc20.x86_64
NetworkManager-glib-0.9.9.0-22.git20131003.fc20.x86_64
NetworkManager-openvpn-0.9.8.2-3.fc20.x86_64
NetworkManager-vpnc-0.9.8.2-2.fc20.x86_64
NetworkManager-openconnect-0.9.8.0-2.fc20.x86_64
NetworkManager-pptp-gnome-0.9.8.2-3.fc20.x86_64
network-manager-applet-0.9.9.0-7.git20131028.fc20.x86_64


How reproducible:
always

Steps to Reproduce:
-Have a configured Ethernet interface (in my case, named p4p1)  (*) (**)
-in network-manager-applet, add a new bridge
-add a slave to it
-choose type "Ethernet"
-in the "MAC Address" dropdown menu, choose p4p1  (*)
-(**) eventually configure the IPv4 address manually
-Validate everything

(*) : according to my tests, this is not necessary
(**) : I tried with both DHCP (I have an external DHCP server on my network) and manual configuration

Actual results:
In the Applet, the Ethernet connection stays connected, while the bridge stays in the state "Connecting". The "Bridge slaves" label shows "(none)".
#brctl show
>bridge name	bridge id		STP enabled	interfaces
>br0		0080.000000000000	yes		


Expected results:
-The Ethernet connection should get disconnect (TBC)
-The "Bridge slaves" label should show "p4p1"
-The bridge should get connected
#brctl show   #(expected)
>bridge name	bridge id		STP enabled	interfaces
>br0		0080.000000000000	yes		p4p1

Additional info:
I also tried the following, without success :

# nmcli con show conf
NAME                UUID                                  TYPE            TIMESTAMP-REAL                  
Wired connection 1  8b510c02-85ff-4c53-8909-5779db1dcdf9  802-3-ethernet  Fri 10 Jan 2014 09:29:50 AM CET 

# nmcli con add type bridge ifname br0
Connection 'bridge-br0' (575b7fe6-37e9-4677-a21e-fb6a17d0941b) successfully added.

# nmcli con add type bridge-slave ifname p4p1 master bridge-br0
Connection 'bridge-slave-p4p1' (44cea78d-b3f6-4657-a7e8-60ce0226a29e) successfully added.

# nmcli con show conf
NAME                UUID                                  TYPE            TIMESTAMP-REAL                  
Wired connection 1  8b510c02-85ff-4c53-8909-5779db1dcdf9  802-3-ethernet  Fri 10 Jan 2014 09:29:50 AM CET 
bridge-slave-p4p1   44cea78d-b3f6-4657-a7e8-60ce0226a29e  802-3-ethernet  never                           
bridge-br0          575b7fe6-37e9-4677-a21e-fb6a17d0941b  bridge          never                           

# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		0080.000000000000	yes		

As you can see in the last step, the bridge does not get the p4p1 interface.

Comment 1 Steffen Frömer 2014-01-21 19:55:33 UTC
Tried also with no success.

configured same as above.

if i manually bringing up the configured bridge device, i get following error on terminal:

$ nmcli connection up bridge-br0 
Error: Device 'br0' is waiting for slaves before proceeding with activation.


$ brctl show 
bridge name	bridge id		STP enabled	interfaces
br0		0080.000000000000	yes		



# messages on /var/log/messages during bringing up the bridge interface
NetworkManager[4483]: ifcfg-rh:     read connection 'bridge-slave-em1'
NetworkManager[4483]: <info> (br0): carrier is OFF
NetworkManager[4483]: <info> (br0): new Bridge device (driver: 'bridge' ifindex: 11)
NetworkManager[4483]: <info> (br0): exported as /org/freedesktop/NetworkManager/Devices/8
NetworkManager[4483]: <info> (br0): No existing connection detected.
NetworkManager[4483]: <info> (br0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[4483]: <info> (br0): bringing up device.
NetworkManager[4483]: <info> (br0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
NetworkManager[4483]: <info> Activation (br0) starting connection 'bridge-br0'
NetworkManager[4483]: <info> (br0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[4483]: <info> Activation (br0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[4483]: <info> Activation (br0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[4483]: <info> Activation (br0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[4483]: <info> Activation (br0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[4483]: <info> Activation (br0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[4483]: <info> (br0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[4483]: <info> Activation (br0) Stage 2 of 5 (Device Configure) successful.
NetworkManager[4483]: <info> Activation (br0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[4483]: <info> Activation (br0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[4483]: <info> Activation (br0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[4483]: <info> (br0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[4483]: <info> (br0): IPv4 config waiting until carrier is on
NetworkManager[4483]: <info> (br0): IPv6 config waiting until carrier is on
NetworkManager[4483]: <info> Activation (br0) Stage 3 of 5 (IP Configure Start) complete.
avahi-daemon[637]: Registering new address record for fe80::ec7c:16ff:fe41:6b2b on br0.*.

Comment 2 Simon Perreault 2014-01-31 14:19:48 UTC
Same results here with KDE applet.

Comment 3 Steffen Frömer 2014-02-03 21:01:58 UTC
Hi,

I found out a working solution.
Not the best solution at this time.


try these steps:
# nmcli con add type bridge ifname br0
# nmcli con add type bridge-slave ifname em1 master br0
# nmcli dev disconnect em1
# nmcli con up bridge-slave-em1

# brctl show
>bridge name	bridge id		STP enabled	interfaces
>br0		0080.5c260a447c0b	yes		em1
>virbr0		8000.000000000000	yes		


founded hints at: https://lists.fedoraproject.org/pipermail/devel/2014-January/194201.html

Comment 4 Nathanael Noblet 2015-01-15 20:06:39 UTC
I can confirm Steffen's work around works. This is also a regression from F20 since I could setup a bridge using the normal GUI tools. When I upgraded to F21 the bridge stopped working and I didn't have time to fix it. I had to delete all my original F20 working bridge configuration and follow comment #3 to get it working.

I'm willing to help test git versions or whatever patches to see if we can get it fixed and working again.

Comment 5 Jaroslav Reznik 2015-03-03 15:22:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Jirka Klimes 2015-04-29 12:07:23 UTC
The thing is that bringing up a bridge (master) in NetworkManager doesn't bring up its slaves. You need to activate slave to bring up the bridge (master is activated automatically as a slave dependency). So the key command here is 'nmcli con up bridge-slave-em1' activating the slave.
Note: the nmcli commands can (should) be run as a normal user.

However, there is an RFE for introducing an option for bringing up slaves automatically when master was activated - bug 1158529.

Comment 7 Fedora Admin XMLRPC Client 2015-08-18 14:59:22 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Jirka Klimes 2015-12-15 15:44:26 UTC
Implemented in https://bugzilla.gnome.org/show_bug.cgi?id=735052 and in Fedora now.


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