Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(net-lib): add a new dracut module called net-lib #2250

Closed
wants to merge 1 commit into from

Conversation

LaszloGombos
Copy link
Collaborator

@LaszloGombos LaszloGombos commented Feb 28, 2023

Motivations:

  • meta modules (such as dbus or network) should not include any scripts. meta modules should only have module-setup.sh files as it has been also pointed out during earlier PR reviews and discussions.
  • fix dependencies. As an example dracut -m network-manager produces a broken initramfs that this PR fixes.
  • follow the wise people before me with good modular design as it has been proven for e.g. fs-lib, url-lib modules

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Fixes #2195

@github-actions github-actions bot added modules Issue tracker for all modules network Issues related to the network module network-legacy Issues related to the network-legacy module network-manager Issues related to the network-manager module labels Feb 28, 2023
@LaszloGombos LaszloGombos marked this pull request as draft February 28, 2023 20:02
@github-actions github-actions bot added the github Issues related to .github label Feb 28, 2023
@github-actions github-actions bot added ifcfg Issues related to the ifcfg module url-lib Issues related to the url-lib module labels Feb 28, 2023
@github-actions github-actions bot removed the ifcfg Issues related to the ifcfg module label Feb 28, 2023
@github-actions github-actions bot removed the url-lib Issues related to the url-lib module label Feb 28, 2023
@github-actions github-actions bot added the nfs Issues related to the nfs module label Feb 28, 2023
@LaszloGombos LaszloGombos marked this pull request as ready for review March 1, 2023 00:12
@LaszloGombos
Copy link
Collaborator Author

LaszloGombos commented Mar 1, 2023

Before PR (net-lib.sh is NOT included)

dracut: Arguments: -v -m 'network-manager'
dracut: dracut modules:
dracut: bash
dracut: systemd
dracut: dbus-daemon
dracut: dbus
dracut: network-manager

After PR (net-lib.sh is included)

dracut: Arguments: -v -m 'network-manager'
dracut: dracut modules:
dracut: bash
dracut: systemd
dracut: dbus-daemon
dracut: dbus
dracut: network-manager
dracut: net-lib
dracut: udev-rules
dracut: base

networking tests are all passing (without changing the tests itself, which is a good indication for maintaining compatibility)

@LaszloGombos LaszloGombos changed the title feat(net-lib): add a new module more net-lib feat(net-lib): add a new module net-lib Mar 1, 2023
@LaszloGombos LaszloGombos changed the title feat(net-lib): add a new module net-lib feat(net-lib): add a new module called net-lib Mar 1, 2023
@LaszloGombos LaszloGombos added this to the dracut-060 milestone May 8, 2023
@LaszloGombos LaszloGombos requested a review from lnykryn May 10, 2023 03:16
@LaszloGombos LaszloGombos changed the title fix(net-lib): add a new module called net-lib fix(net-lib): add a new dracut module called net-lib May 10, 2023
@LaszloGombos
Copy link
Collaborator Author

@aafeijoo-suse do you have any questions or concerns regarding this PR ?

modules.d/45net-lib/module-setup.sh Show resolved Hide resolved
modules.d/01systemd-networkd/module-setup.sh Outdated Show resolved Hide resolved
modules.d/95nfs/nfs-lib.sh Show resolved Hide resolved
@LaszloGombos LaszloGombos force-pushed the netlib branch 2 times, most recently from 347e780 to bee6d1f Compare July 7, 2023 21:41
@github-actions github-actions bot added the test Issues related to testing label Jul 7, 2023
@LaszloGombos
Copy link
Collaborator Author

@aafeijoo-suse if you have time, can you please help and check if your concerns are resolved on this PR. Thank you !

@LaszloGombos
Copy link
Collaborator Author

LaszloGombos commented Jul 28, 2023

My main concern is how many setups will break with this change

Valid concern indeed.

I thought that you wanted to be conservative.

I still prefer to be conservative. #2314 is changing the dracut module interface, this PR does not.

I started documenting different aspects of compatibility here: https://github.com/dracutdevs/dracut/wiki/Dracut-development#compatibility .

This is best example. From a quick look of it, it seems this module needs to change, BUT after the one-time change it seems that this out-of-tree module can just depend on this newly created net-lib instead of cherry-picking a single file from the network module that has no compatibility promise.

We should work with this project if possible, but we should not have any kind of compatibility promise for projects picking single files from random directories. This is not even a proper dracut module, it is just a shell script.

Same. Not a dracut module.

This is packaging file. Irrelevant.

As next step I will reach out to bootengine and see if I can get some feedback from them on this PR (instead of me guessing what they think).

@LaszloGombos
Copy link
Collaborator Author

Based on discussion at flatcar/bootengine#69 it does not look like there is opposition for this change.

@LaszloGombos
Copy link
Collaborator Author

LaszloGombos commented Mar 5, 2024

From @Mrfai

dracut module network-legacy installs parse-ibft.sh which want to source /lib/net-lib.sh which is only installed by module network. So should network-legacy depend on network?
I had an issue when booting failed with net-lib.sh file not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs connman github Issues related to .github modules Issue tracker for all modules network Issues related to the network module network-legacy Issues related to the network-legacy module network-manager Issues related to the network-manager module nfs Issues related to the nfs module test Issues related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net-lib dracut module
3 participants