Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#43803 - [netctl] bonding does not work without modifications
Attached to Project:
Arch Linux
Opened by Dale Blount (dale) - Thursday, 12 February 2015, 21:51 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 16 June 2015, 21:04 GMT
Opened by Dale Blount (dale) - Thursday, 12 February 2015, 21:51 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 16 June 2015, 21:04 GMT
|
DetailsDescription:
Netctl with bonding does not let the interface come up without modifications to /usr/lib/network/connections/bond Additional info: netctl 1.10-1 I had to comment out the "return 1" on line 11 of /usr/lib/network/connections/bond to get the bonding connection to come up. I don't have the cut-and-paste errors as I was doing this over an iDrac (VNC-like) connection, but probably can get them if they are needed. |
This task depends upon
Closed by Jouke Witteveen (jouke)
Tuesday, 16 June 2015, 21:04 GMT
Reason for closing: Upstream
Additional comments about closing: Nothing meaningful we can do...
Tuesday, 16 June 2015, 21:04 GMT
Reason for closing: Upstream
Additional comments about closing: Nothing meaningful we can do...
netctl restart bond0 is enough to bring it back after the system boots, unfortunately it needs to be done from console as the network is down until that comes up.
Says only: "Failed to start Bond Interface" under systemctl status netctl@bond0.service
I think this stems from the fact that the first time the 'ip link add name bond0 type bond mode <X>' command is called after boot (whether manually or in '/usr/lib/network/connections/bond' by systemd) the "bonding" module is autoloaded and defaults to mode 'balance-rr', disregarding any value provided to the 'mode' parameter (the error "RTNETLINK answers: File exists" is visible if the command is run on the command line). If one deletes the bond0 interface and then re-creates it with the same 'ip link' command this time the mode is set properly since the module is not loaded a second time and therefore doesn't override the 'mode' argument.
Modiyfing the bond script to reproduce the same behavior also works around the issue:
--- /usr/lib/network/connections/bond.orig 2015-01-13 08:23:37.000000000 -0500
+++ /usr/lib/network/connections/bond 2015-03-24 10:48:15.349914410 -0400
@@ -11,6 +11,8 @@
return 1
fi
+ interface_add bond "$Interface" "" # "dummy" interface_add to load bonding module
+ interface_delete "$Interface" # delete interface to re-add with proper mode below
interface_add bond "$Interface" "" ${Mode:+mode "$Mode"}
bring_interface_up "$Interface"
for slave in "${BindsToInterfaces[@]}"; do
-Martin
For my personal case all I wanted to achieve was allow netctl to successfully bring up a bond upon boot up that uses mode other than balance-rr. Is this what is against the logic of netctl 'owning' the interface?
@Martin: thanks for researching. Could it be that this is a bug in the way `ip` loads the bonding module?
I see two possibilities here: one can either elect to create netctl profiles with bonding interface names *other* than "bond0" (which results in the autocreated bond0 interface being "useless", or create a "/etc/modprobe.conf/bonding.conf" file with:
options bonding max_bonds=0
so that no bonding interfaces are created automatically upon module loading.
Maybe this one gets fixed upstream, some day. Otherwise it is one for netctl 2, which would interface the systemd state machine more directly, but will possibly never materialize as systemd (networkd) is not too CLI-friendly.
I concur. I don't see how netctl can work around this anymore than 'ip' can.