Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 400613 - sys-apps/openrc-0.9.8.1 breaks network bonding
Summary: sys-apps/openrc-0.9.8.1 breaks network bonding
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: OpenRC Team
URL:
Whiteboard: openrc:oldnet
Keywords:
: 400847 (view as bug list)
Depends on:
Blocks: 399185 400787
  Show dependency tree
 
Reported: 2012-01-24 17:25 UTC by Michael Reithinger
Modified: 2013-04-25 23:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
And here is the fix (openrc-fix-bonding.patch,241 bytes, patch)
2012-01-25 10:36 UTC, Xake
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Reithinger 2012-01-24 17:25:21 UTC
I use the the following /etc/conf.d/net configuration:

config_eth0="null"
config_eth1="null"
slaves_bond0="eth0 eth1"
config_bond0="dhcp"

This works fine in 0.9.4.

In 0.9.8.1 the dhcp lease is not executed for bond0 but for the last slave (eth1):
ifconfig shows the following:

bond0     Protokoll:Ethernet  Hardware Adresse 14:da:e9:15:0e:d6  
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:33974 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23450 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0 
          RX bytes:40508403 (38.6 MiB)  TX bytes:2199483 (2.0 MiB)

eth0      Protokoll:Ethernet  Hardware Adresse 14:da:e9:15:0e:d6  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:17148 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11726 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX bytes:20353454 (19.4 MiB)  TX bytes:1102015 (1.0 MiB)
          Interrupt:18 Speicher:fbc00000-fbc20000 

eth1      Protokoll:Ethernet  Hardware Adresse 14:da:e9:15:0e:d6  
          inet Adresse:192.168.2.107  Bcast:192.168.2.255  Maske:255.255.255.0
          inet6 Adresse: fe80::16da:e9ff:fe15:ed6/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:16826 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11724 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX bytes:20154949 (19.2 MiB)  TX bytes:1097468 (1.0 MiB)
          Interrupt:18 Speicher:fb800000-fb820000 


The same happend with a manual configuration like:

  config_bond0="192.168.2.33 netmask 255.255.255.0"
  routes_bond0="default via 192.168.2.1"

The last slave (eth0) will configured, but not the bond0 device.

Reproducible: Always
Comment 1 Andrew Savchenko gentoo-dev 2012-01-24 17:59:58 UTC
The same problem here with openrc-0.9.8.1: in raises bond-dependent vlans not on bond0, but on the last bond's slave (eth1):

vlan23@eth1, vlan25@eth1, etc instead of vlan23@bond0, vlan25@bond0, etc...
when
vlan_bond0="23 25"
slaves_bond0="eth0 eth1"

Sorry, can't post more ATM, because I lost networks access to my system due to this nice, yummy, tasty, wonderful, ingenious update and I'm working with it using ilo.
Comment 2 Andrew Savchenko gentoo-dev 2012-01-24 18:21:46 UTC
The same shit with 0.9.8, version 0.9.7 worked well before update.
But now, so thanks to someone hastily removed 0.9.7 from the tree, I have to revert to 0.9.4 8-( of course, it also works.
Comment 3 Marek Królikowski 2012-01-25 09:59:43 UTC
Some problem here:

XXX ~ # cat /etc/conf.d/net
config_eth0="null"
config_eth1="null"
slaves_bond0="eth0 eth1"
dns_servers_bond0="172.17.1.1"
config_bond0="172.17.1.130/24"
routes_bond0="default gw 172.17.1.20"

After downgrade do 0.9.4 all working good.
Comment 4 Xake 2012-01-25 10:36:49 UTC
Created attachment 299817 [details, diff]
And here is the fix

The bonding script does a lot of funny stuff, including setting the slaves as IFACE one by one and running commands on them preparing them for the bond.

However currently OpenRC does not unset IFACE (and thus resetting it to the name of the bond) before it returns, making the last slave it poke at the current IFACE, resulting in the rest of the network setup being ran against that slave instead of the bond.

One line fix provided.
Comment 5 Xake 2012-01-25 10:39:22 UTC
Also: tested on a stable system. Has run it on a ~arch system before. Got bitten by this in a former upgrade, and now again this night after I upgraded to OpenRC-0.9.8.1, so it annoyed me enough to post the patch.

Please fix soon.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-01-25 18:56:05 UTC
Fixed in 0.9.8.2, will be rapid-stable
Comment 7 Attila Tóth 2012-01-26 12:38:31 UTC
*** Bug 400847 has been marked as a duplicate of this bug. ***
Comment 8 Attila Tóth 2012-01-26 12:39:58 UTC
(In reply to comment #5)
> Also: tested on a stable system. Has run it on a ~arch system before. Got
> bitten by this in a former upgrade, and now again this night after I upgraded
> to OpenRC-0.9.8.1, so it annoyed me enough to post the patch.
> 
> Please fix soon.

Hi Xake! Thanks for the fix!

Dw.