-
Notifications
You must be signed in to change notification settings - Fork 158
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
fedora-coreos-base: use NetworkManager for networking in the initramfs #310
Conversation
this worked in some early testing. I've still got more testing to do and maybe we can automate some of it and put it in CI. I just rebased on top of latest master so respinning everything locall too. Also one issue that came up is how NM processes the dracut commandline args for networking: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/391 We'll see what they think about the behavior. |
04bfabe
to
1ec4042
Compare
manifests/fedora-coreos-base.yaml
Outdated
# Networking is NetworkManager | ||
- --omit=systemd-networkd network-legacy | ||
- --add=network-manager |
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.
Question: do we actually want to be explicit about this? A big part of FCOS is following Fedora defaults where possible, and previously we were actively working to avoid the default of NM-in-initrd. If we just drop that part (the nm-initrd-generator
bit), we essentially get the same thing, right? My personal opinion is this would be cleaner, but don't feel strongly about this though.
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.
IOW don't be explicit here and it should revert to the default of NM in the initrd because we are no longer deleting the nm-initrd-generator binary?
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.
Right, exactly.
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.
Actually, initramfs args is one place where default vs explicit propagates to the user now that rpm-ostree knows to re-use the same base args when regenerating the initrd (coreos/rpm-ostree#1997). In the default case, one can override it with rpm-ostree initramfs --add=network-legacy
. In the explicit case, I think one would have to do --omit=network-manager --add=network-legacy
. (Not saying one would want to do this, but it demonstrates the difference well.)
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.
ok I pushed up a rebase that removes the dracut args. Tests look like it still works with nm in the initrd.
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.
It'd be good to have someone besides Dusty play with this before we land it I think.
Yup, sanity checking this on top of coreos/ignition-dracut#159 right now! |
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.
Dusty tested this on top of a bunch of combinations around bonding, teaming, bridging, and static networking. I tested it on top of various DHCPv4 and v6 configurations. All seems to be working well! (And any regression I think we can work with the NM team to get fixed as follow-ups.)
Thanks a lot for this!
BTW you could probably create a new test like #305 that maybe uses e.g. |
yeah I don't see a good string in the journal logs that indicate NM is running in the initramfs (vs in the real root) other than things like
Maybe I can look at the strings from the teardown service:
If I add it I'll add it in a follow up since I'd like to get this out today. |
Moving to NetworkManager in the initrd should help us solve some problems we've been having with Networking. For what we want to do in Fedora CoreOS doing this right requires the network to be torn down in the initrd and also possibly propagated forward. We effectively move *to* NetworkManager in the initrd (the default in Fedora 31+) by putting back in the nm-initrd-generator, which we were previously removing. Requires: coreos/ignition-dracut#159 Fixes: coreos/fedora-coreos-tracker#394
Needed for appropriately implementing NetworkManager support in the initramfs. See coreos/ignition-dracut#159
ok I added a second commit that adds an override for the ignition rpm to get the latest bits that have coreos/ignition-dracut#159. Will merge this after tests pass. |
This is how I've been doing network testing for the NM in the initrd PR (coreos#310). One day I'd like to convert this into some more sophisticated test that can be run in our CI but AFAIU right now that's not possibly because our CI is limited to qemu unprivileged networking. For now let's put this $somewhere so that we can pull it out at least when we suspect problems.
ok I've been testing this using an ugly script for now (better than hand testing at least 😄). It goes through and makes sure variations of initrd passed networking config and ignition passed networking config works. See #316 |
This is how I've been doing network testing for the NM in the initrd PR (coreos#310). One day I'd like to convert this into some more sophisticated test that can be run in our CI but AFAIU right now that's not possibly because our CI is limited to qemu unprivileged networking. For now let's put this $somewhere so that we can pull it out at least when we suspect problems.
This is how I've been doing network testing for the NM in the initrd PR (coreos#310). One day I'd like to convert this into some more sophisticated test that can be run in our CI but AFAIU right now that's not possibly because our CI is limited to qemu unprivileged networking. For now let's put this $somewhere so that we can pull it out at least when we suspect problems.
This is how I've been doing network testing for the NM in the initrd PR (coreos#310). One day I'd like to convert this into some more sophisticated test that can be run in our CI but AFAIU right now that's not possibly because our CI is limited to qemu unprivileged networking. For now let's put this $somewhere so that we can pull it out at least when we suspect problems.
tests passed! |
This is how I've been doing network testing for the NM in the initrd PR (#310). One day I'd like to convert this into some more sophisticated test that can be run in our CI but AFAIU right now that's not possibly because our CI is limited to qemu unprivileged networking. For now let's put this $somewhere so that we can pull it out at least when we suspect problems.
Moving to NetworkManager in the initrd should help us solve some
problems we've been having with Networking. For what we want to
do in Fedora CoreOS doing this right requires the network to be
torn down in the initrd and also possibly propagated forward.
Requires: coreos/ignition-dracut#159
Fixes: coreos/fedora-coreos-tracker#394