RE: configuring bonding using NetworkManager-0.9.4 in Fedora 17
- From: <Narendra_K Dell com>
- To: <networkmanager-list gnome org>
- Cc: Shyam_Iyer Dell com, Charles_Rose Dell com
- Subject: RE: configuring bonding using NetworkManager-0.9.4 in Fedora 17
- Date: Thu, 26 Jul 2012 15:23:40 +0530
> -----Original Message-----
> From: networkmanager-list-bounces gnome org [mailto:networkmanager-
> list-bounces gnome org] On Behalf Of K, Narendra
> Sent: Wednesday, July 18, 2012 9:11 PM
> To: networkmanager-list gnome org
> Cc: Iyer, Shyam; Rose, Charles
> Subject: configuring bonding using NetworkManager-0.9.4 in Fedora 17
>
> Hello,
>
> I am trying to configure bonding using NetworkManager in Fedora 17.
> Fedora 17 has NetworkManager-0.9.4. The configuration files look like the
> following -
>
> Under /etc/sysconfig/network-scripts/
>
> # cat ifcfg-bond0
> DEVICE=bond0
> BOOTPROTO=dhcp
> ONBOOT=yes
> NM_CONTROLLED="yes"
> BONDING_MASTER="yes"
> BONDING_OPTS="miimon=50 mode=balance-tlb"
>
> # cat ifcfg-em3
> BOOTPROTO="none"
> DEVICE="em3"
> ONBOOT="yes"
> MASTER="bond0"
> SLAVE="yes"
> TYPE=Ethernet
> NM_CONTROLLED="yes"
>
> After restarting the NetworkManager, i have the following observations -
>
> 1. The bonding device bond0 does not have a MAC Id set 2. The slave device
> as mentioned in the ifcfg-em3 is not enslaved 3. The bond0 has the miimon
> and mode as described in the BONDING_OPTS set.
>
> # ip addr show dev bond0
> 20: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500
> qdisc noqueue state DOWN
> link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
>
> # cat /sys/class/net/bond0/bonding/slaves
> -
>
> ## cat /sys/class/net/bond0/bonding/{miimon,mode}
> 50
> balance-tlb 5
>
> I am trying to get familiar with NetworkManager, and putting some prints in
> 'src/nm-device-bond.c' to find more details on points 1 and 2. It would be
> great if you could point out if I am missing some aspect as part of
> configuration.
[>]
It seems like there is an issue in the way bonding is configured. Putting a few prints in 'src/nm-device.c' I had the following observations -
The sequence of events while setting up the bonding seems to be
1. 'nm_device_activate' is executed for bond0 and the sequence continues through 'nm_device_activate_schedule_stage1_device_prepare', executing multiple stages of activation
2. 'nm_device_activate' is executed for slave1, but because there is a dependency on 'bond0' the activation is postponed. This can be seen from the message
NetworkManager[21466]: <info> Activation (em3) connection 'System em3' waiting on dependency 'Bond bond0'
3. 'nm_device_activate' is executed for slave2, but because there is a dependency on 'bond0' the activation is postponed. This can be seen from the message
NetworkManager[21466]: <info> Activation (em4) connection 'System em4' waiting on dependency 'Bond bond0'
It seems like step 2 and 3 are waiting for some state of bond0 to be reached and notified. But later messages indicate that they time out waiting on dependency.
NetworkManager[21466]: <warn> Activation (em3) connection 'System em3' dependency timed out
NetworkManager[21466]: <warn> Activation (em4) connection 'System em4' dependency timed out
NetworkManager[21466]: <info> (bond0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
NetworkManager[21466]: <warn> Activation (em3) connection 'System em3' dependency failed
NetworkManager[21466]: <warn> Activation (em4) connection 'System em4' dependency failed
NetworkManager[21466]: <warn> Activation (bond0) failed.
NetworkManager[21466]: <info> Activation (bond0) Stage 4 of 5 (IPv4 Configure Timeout) complete.
NetworkManager[21466]: <info> (em3): device state change: prepare -> failed (reason 'dependency-failed') [40 120 50]
NetworkManager[21466]: <warn> Activation (em3) failed.
NetworkManager[21466]: <info> (em4): device state change: prepare -> failed (reason 'dependency-failed') [40 120 50]
NetworkManager[21466]: <warn> Activation (em4) failed.
NetworkManager[21466]: <info> (bond0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Now some processing as part of point 1 needs to set a state which will be processed in 'act_dep_result_cb' which would process the 'result' being equal to 'NM_ACT_REQUEST_DEP_RESULT_READY' and launch 'nm_device_activate_schedule_stage1_device_prepare(self)' so that the activation proceeds and enslaving succeeds. The 'NM_ACT_REQUEST_DEP_RESULT_READY' state does not seem to be happening and as a result slaves are not enslaved.
I got the slaves to get enslaved by allowing the code path to fall through from the case 'NM_ACT_REQUEST_DEP_RESULT_WAIT' to 'NM_ACT_REQUEST_DEP_RESULT_READY ' in the function 'nm_device_activate' in 'src/nm-device.c'.
Any thoughts here would be helpful.
With regards,
Narendra K
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]