Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 659352

Summary: >sys-kernel/genkernel-3.5.0.3: bonding arguments from /etc/conf.d/modules ignored when using an initramfs
Product: Gentoo Hosted Projects Reporter: Tomáš Mózes <hydrapolic>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED WONTFIX    
Severity: normal CC: openrc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 659530    
Bug Blocks:    

Description Tomáš Mózes 2018-06-27 11:47:44 UTC
After upgrading to sys-kernel/genkernel-3.5.3.3, the bonding kernel module arguments are ignored from /etc/conf.d/modules if using an initramfs from genkernel. It works as expected with previous stable version 3.4.52.4-r3.

Since the initrd loads the bonding module before the boot service module is started, the latter cannot insmod bonding (for example with other bonding mode).

Bonding was added to MODULES_NET after 3.5.0.3:
https://github.com/gentoo/genkernel/commit/f99593cc304527d7b3cc5e964ffad51556e1434c#diff-0bc427afad0720ee65a32fb482e12a26
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-06-27 18:05:31 UTC
What code is loading the bonding module after initramfs and needs to be updated to use the sysfs toggles to change the parameters?
Comment 2 Tomáš Mózes 2018-06-27 22:33:23 UTC
/etc/init.d/modules of openrc (run in the boot runlevel). It won't insmod bonding (with args) since genkernel already loaded it.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-06-27 23:08:28 UTC
Are you using netifrc? You have seen the sysfs support for setting bond params yes?
Comment 4 Tomáš Mózes 2018-06-28 07:02:34 UTC
Didn't know about this possibility before, so instead of:

/etc/conf.d/modules
modules="bonding"
module_bonding_args="mode=active-backup miimon=100"

It will be done like this:

/etc/conf.d/modules
modules="bonding"

/etc/conf.d/net
mode_bond0="active-backup"
miimon_bond0="100"

Thanks for pointing that out, I'll try like that. Is it worth adding a pkg_postinst() message to genkernel that the newly added modules will have to be configured via netifrc because /etc/conf.d/modules will be ignored? Or should openrc be changed to allow these changes as well?
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2019-05-04 20:13:51 UTC
Presuming per the last comments that the netifrc solution was used.
Comment 6 Tomáš Mózes 2019-05-04 20:27:43 UTC
Yes, it works fine, thanks.