-
Notifications
You must be signed in to change notification settings - Fork 159
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
unfreeze dracut, adapt for NM via systemd in initrd #1068
Merged
dustymabe
merged 4 commits into
coreos:testing-devel
from
dustymabe:dusty-unfreeze-dracut
Jul 9, 2021
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2a30fec
unfreeze dracut, adapt for NM via systemd in initrd
dustymabe b0c857c
overrides: fast-track dracut-055-3.fc34
dustymabe e987b61
35coreos-network: order coreos-copy-firstboot-network before ignition…
dustymabe 99ecca7
35coreos-multipath: add Before=initrd-parse-etc.service in coreos-pro…
jlebon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,20 +8,20 @@ | |
# - i.e. after /dev/disk/by-label/boot is available | ||
# - and after the ignition-dracut GPT generator (see below) | ||
# - Need to run before networking is brought up. | ||
# - This is done in nm-run.service [1] | ||
# - i.e. Before=nm-run.service | ||
# - This is done in nm-initrd.service [1] | ||
# - i.e. Before=nm-initrd.service | ||
# - Need to make sure karg networking configuration isn't applied | ||
# - There are two ways to do this. | ||
# - One is to run *before* the nm-config.sh [2] that runs as part of | ||
# dracut-cmdline [3] and `ln -sf /bin/true /usr/libexec/nm-initrd-generator`. | ||
# - i.e. Before=dracut-cmdline.service | ||
# - Another is to run *after* nm-config.sh [2] in dracut-cmdline [3] | ||
# and just delete all the files created by nm-initrd-generator. | ||
# - i.e. After=dracut-cmdline.service, but Before=nm-run.service | ||
# - i.e. After=dracut-cmdline.service, but Before=nm-initrd.service | ||
# - We'll go with the second option here because the need for the /boot | ||
# device (mentioned above) means we can't start before dracut-cmdline.service | ||
# | ||
# [1] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/nm-run.service | ||
# [1] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/nm-initrd.service | ||
# [2] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/nm-config.sh | ||
# [3] https://github.com/dracutdevs/dracut/blob/master/modules.d/35network-manager/module-setup.sh#L34 | ||
# | ||
|
@@ -30,8 +30,8 @@ Description=Copy CoreOS Firstboot Networking Config | |
ConditionPathExists=/usr/lib/initrd-release | ||
DefaultDependencies=false | ||
Before=ignition-diskful.target | ||
Before=nm-run.service | ||
# compat: remove when everyone is on dracut 053+ | ||
Before=nm-initrd.service | ||
# compat: remove when everyone is on dracut 054+ | ||
Before=dracut-initqueue.service | ||
After=dracut-cmdline.service | ||
# Any services looking at mounts need to order after this | ||
|
@@ -47,6 +47,10 @@ After=coreos-multipath-wait.target | |
# hook which will generate NM configs from the network kargs, but we want to | ||
# have precedence. | ||
After=coreos-enable-network.service | ||
# We've seen races with ignition-kargs.service, which accesses /boot rw. | ||
# Let's introduce some ordering here. Need to use `Before` because otherwise | ||
# we get a systemd ordering cycle. https://github.com/coreos/fedora-coreos-tracker/issues/883 | ||
Before=ignition-kargs.service | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm OK yeah that makes sense now looking at the cycle in coreos/fedora-coreos-tracker#883 (comment). We need networking to fetch the config to apply the kargs. And this service obviously has to run before networking comes up since the whole point is network configuration. |
||
|
||
[Service] | ||
Type=oneshot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hmm, should we keep
nm-run.service
and just addnm-initrd.service
? That way ifnm-run.service
is backported to RHEL, but notnm-initrd.service
, this will still work for RHCOS.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.
I highly doubt that will happen as nm-run.service was only in there for one release of dracut (
053
) and was replaced by the full systemd+dbus implementation because the NM team actively wants it for the next version of RHEL.IMHO I'd rather it fail so we could consider and fix our wrong assumption.