-
Notifications
You must be signed in to change notification settings - Fork 401
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(45ifcfg): mark as deprecated and strictly opt-in #2529
Conversation
An alternative is to tweak the conditional to check whether the directory is non-empty (skipping over the README) to know if ifcfg files are in use, but that creates a bootstrapping problem where you want ifcfg files generated on first boot to get propagated there in the first place. I also wanted to see if we could have a stronger stance on this and maybe eventually get rid of that module entirely. |
It's been a while since we've moved to only propagating NM keyfiles from the initrd to the real root, so we no longer need this module. It currently still gets pulled in due to the `/etc/sysconfig/network- scripts` directory existing in the real root (which contains a README by default). There's a patch upstream to make it purely opt-in[[1]], but for now let's just explicitly opt out ourselves. (Note this has no impact on whether ifcfg in the real root is supported, which it still is in RHCOS. It just stops uselessly generating ifcfg files in the initrd.) [1]: dracutdevs/dracut#2529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST-60-BONDBRIDGEVLANIFCFG
using the network-legacy
module in Fedora needs to be addressed: https://github.com/dracutdevs/dracut/actions/runs/6353041817/job/17256980641?pr=2529#step:4:1186
The ifcfg
module is required and not automatically included. See an old run, e.g.: https://github.com/dracutdevs/dracut/actions/runs/6309637128/job/17129970526?pr=2527#step:4:101
Apart from that, I'm ok with deprecating RH-specific code, or removing this module if it's no longer needed.
Makes sense to me, ifcfg support is also being deprecated in NetworkManager and will be removed eventually. |
It's been a while since we've moved to only propagating NM keyfiles from the initrd to the real root, so we no longer need this module. It currently still gets pulled in due to the `/etc/sysconfig/network- scripts` directory existing in the real root (which contains a README by default). There's a patch upstream to make it purely opt-in[[1]], but for now let's just explicitly opt out ourselves. (Note this has no impact on whether ifcfg in the real root is supported, which it still is in RHCOS. It just stops uselessly generating ifcfg files in the initrd.) [1]: dracutdevs/dracut#2529
Hmm OK, I'm not sure if I'm following the testing code properly. Do I just need a |
@jlebon can you please try to add this and see if that resolves the regression with TEST-60. Thanks !
|
The `45ifcfg` module should be considered deprecated now since ifcfg files themselves are deprecated. They've been replaced by e.g. NetworkManager keyfiles or systemd-networkd files. Currently, the `45ifcfg` module checks if the `/etc/sysconfig/network- scripts` directory exists to know if to automatically get pulled in. However, on systems with NetworkManager, this directory always exists even if the functionality to read ifcfg files is disabled by default (NM kindly ships a README in there to ease migrating to keyfiles). Since almost everyone should've already migrated to a more modern alternative, let's make this module purely opt-in now.
2b1f338
to
96a95f2
Compare
Ahhh thanks. My mind got mixed up while looking at the test code and was thinking about Looks like that fixes it, though there are other tests that failed. Seems like we'll need to tweak a few others. |
Remaining test failures are not regressions, they are existing failures. PR LGTM. |
It's been a while since we've moved to only propagating NM keyfiles from the initrd to the real root, so we no longer need this module. It currently still gets pulled in due to the `/etc/sysconfig/network- scripts` directory existing in the real root (which contains a README by default). There's a patch upstream to make it purely opt-in[[1]], but for now let's just explicitly opt out ourselves. (Note this has no impact on whether ifcfg in the real root is supported, which it still is in RHCOS. It just stops uselessly generating ifcfg files in the initrd.) [1]: dracutdevs/dracut#2529
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
The
45ifcfg
module should be considered deprecated now since ifcfg files themselves are deprecated. They've been replaced by e.g. NetworkManager keyfiles or systemd-networkd files.Currently, the
45ifcfg
module checks if the/etc/sysconfig/network-scripts
directory exists to know if to automatically get pulled in. However, on systems with NetworkManager, this directory always exists even if the functionality to read ifcfg files is disabled by default (NM kindly ships a README in there to ease migrating to keyfiles).Since almost everyone should've already migrated to a more modern alternative, let's make this module purely opt-in now.
Checklist