| Summary: | sys-apps/openrc-0.6.3: can't set bonded connection mode when using sysfs | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Ed Wildgoose <gentoo> |
| Component: | [OLD] baselayout | Assignee: | OpenRC Team <openrc> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gentoo |
| Priority: | High | Keywords: | InOverlay |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
force interface down during creation (in case kernel has brought it up, eg automatically at boot)
Force interface down and also set bond mode *before* trying to set other configuration |
||
|
Description
Ed Wildgoose
2010-10-18 15:53:21 UTC
Aha, isn't that always the way. Once you post the bug the problem becomes clear... So I don't use a bonding kernel module (not sure if that's significant) and the kernel appears to bring up bond0 on it's own at boot, without being asked. Because the interface is already up we can't then change the mode... # cat /sys/class/net/bonding_masters bond0 I modified the bonding.sh script to force the interface down (during creation). Perhaps someone can comment on whether this is the neatest fix? The next issue which came up is that you can only set certain params *after* changing the bond mode. I have adjusted bonding.sh to first look if there is a "mode" entry and if so to set it, then secondly we set all other parameters. It's a tad inelegant in that we end up duplicating some code, but it has the merit that if we discover we need to force other params to be set early then they can be added to the same first loop I have submitted these as two individual patches so that hopefully at least one will be accepted even if the second part is controversial? Grateful if these could be tested and committed since they appear to be blockers for anyone using bonding (clearly not many folks based on the lack of bug reports...) Created attachment 251147 [details, diff]
force interface down during creation (in case kernel has brought it up, eg automatically at boot)
Created attachment 251149 [details, diff]
Force interface down and also set bond mode *before* trying to set other configuration
We will push 0.6.4 in next few days thanks for your patch :) |