After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699755 - bonding: NM repeatedly fails to finish a bonding connection with a slave
bonding: NM repeatedly fails to finish a bonding connection with a slave
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-06 12:41 UTC by Pavel Simerda
Modified: 2013-05-07 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2013-05-06 12:41:23 UTC
I'm installing current master (commit 0a5f272) via Gentoo's live ebuild directly from git with the following configuration and the bond configuration activation just cycles and fails every time. I would like to know whether I'm doing something wrong or there's a bug in NetworkManager.

/etc/NetworkManager/system-connections/Bond:

[connection]
id=Bond
uuid=0334e9e3-f813-4650-b1ae-21ba0616e393
interface-name=testbond
type=bond

[bond]
interface-name=testbond

/etc/NetworkManager/system-connections/Slave:

[connection]
id=Slave
uuid=a842e207-1116-4efe-8727-c1062534fff4
type=ethernet
master=0334e9e3-f813-4650-b1ae-21ba0616e393
slave-type=bond

[ethernet]
mac=f0:de:f1:b8:6a:ee

Log output (1 round):

NetworkManager[11509]: <info> Auto-activating connection 'Bond'.
NetworkManager[11509]: <info> Activation (testbond) starting connection 'Bond'
NetworkManager[11509]: <info> (testbond): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[11509]: <info> Activation (testbond) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[11509]: <info> Activation (testbond) Stage 1 of 5 (Device Prepare) started...
NetworkManager[11509]: <info> (testbond): taking down device.
NetworkManager[11509]: <info> (testbond): bringing up device.
NetworkManager[11509]: <info> Activation (testbond) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[11509]: <info> Activation (testbond) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[11509]: <info> Activation (testbond) Stage 2 of 5 (Device Configure) starting...
NetworkManager[11509]: <info> (testbond): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[11509]: <info> Activation (testbond) Stage 2 of 5 (Device Configure) successful.
NetworkManager[11509]: <info> Activation (testbond) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[11509]: <info> Activation (testbond) Stage 2 of 5 (Device Configure) complete.
NetworkManager[11509]: <info> Activation (testbond) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[11509]: <info> (testbond): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[11509]: <info> (testbond): IPv4 config waiting until carrier is on
NetworkManager[11509]: <info> (testbond): IPv6 config waiting until carrier is on
NetworkManager[11509]: <info> Activation (testbond) Stage 3 of 5 (IP Configure Start) complete.
NetworkManager[11509]: <info> (eth0): carrier now ON (device state 30)
NetworkManager[11509]: <info> Auto-activating connection 'Slave'.
NetworkManager[11509]: <info> Activation (eth0) starting connection 'Slave'
NetworkManager[11509]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[11509]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[11509]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[11509]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[11509]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[11509]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[11509]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[11509]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
NetworkManager[11509]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[11509]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[11509]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[11509]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[11509]: <info> (eth0): taking down device.
NetworkManager[11509]: <info> (testbond): enslaved bond slave eth0
NetworkManager[11509]: <info> Activation (eth0) connection 'Slave' enslaved, continuing activation
NetworkManager[11509]: <info> (testbond): IPv4 config waiting until carrier is on
NetworkManager[11509]: <info> (testbond): IPv6 config waiting until carrier is on
NetworkManager[11509]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
NetworkManager[11509]: <info> (eth0): device state change: ip-config -> secondaries (reason 'none') [70 90 0]
NetworkManager[11509]: <info> (eth0): device state change: secondaries -> activated (reason 'none') [90 100 0]
NetworkManager[11509]: <info> Activation (eth0) successful, device activated.
NetworkManager[11509]: <info> (eth0): carrier now ON (device state 100)
NetworkManager[11509]: <info> (testbond): carrier now ON (device state 70)
NetworkManager[11509]: <warn> (testbond): unhandled IPv4 config method; will fail
NetworkManager[11509]: <info> (testbond): device state change: ip-config -> failed (reason 'none') [70 120 0]
NetworkManager[11509]: <warn> Activation (testbond) failed for connection 'Bond'
NetworkManager[11509]: <info> (testbond): released bond slave eth0 (success 1)
NetworkManager[11509]: <info> (eth0): bringing up device.
NetworkManager[11509]: <warn> Activation (eth0) connection 'Slave' master failed
NetworkManager[11509]: <info> (testbond): IPv6 config waiting until slaves are ready
NetworkManager[11509]: <info> (eth0): carrier now ON (device state 100)
NetworkManager[11509]: <info> (eth0): device state change: activated -> failed (reason 'dependency-failed') [100 120 50]
NetworkManager[11509]: <warn> Activation (eth0) failed for connection 'Slave'
NetworkManager[11509]: <info> (testbond): device state change: failed -> disconnected (reason 'none') [120 30 0]
NetworkManager[11509]: <info> (testbond): deactivating device (reason 'none') [0]
NetworkManager[11509]: <info> (eth0): device state change: failed -> disconnected (reason 'none') [120 30 0]
NetworkManager[11509]: <info> (eth0): deactivating device (reason 'none') [0]
NetworkManager[11509]: <info> Auto-activating connection 'Bond'.
Comment 1 Dan Williams 2013-05-07 17:28:02 UTC
What's the 'nmcli con list uuid <uuid>' output for that slave connection?
Comment 2 Dan Williams 2013-05-07 17:38:20 UTC
Pavel confirmed that the connection has no IPv4 setting, which is expected, and points to a bug in the core daemon.
Comment 3 Dan Williams 2013-05-07 18:04:23 UTC
So the issue is the master; due to some recent changes some settings plugins aren't sending an IP config setting, which should default to "auto" for all devices except slaves.  Unfortunately that now triggers some older code, which wasn't updated for that.
Comment 4 Dan Williams 2013-05-07 18:13:25 UTC
First pass at this is in dcbw/master-ip-config-fix
Comment 5 Dan Winship 2013-05-07 19:54:26 UTC
looks good. the only thing I'd say is that here:

>     const char *method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
> ...
> ...
>+    if (priv->master) /* eg, device is a slave */
>         method = NM_SETTING_IP4_CONFIG_METHOD_DISABLED;
>+    else if (s_ip4)
>+        method = nm_setting_ip4_config_get_method (s_ip4);
> 

I think it would make things more obvious if you put the default value here as well:

      else
          method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;

rather than initializing it at the top. likewise for ipv6
Comment 6 Dan Williams 2013-05-07 20:58:37 UTC
Fixed and merged.