This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new ignition-fetch-offline.service
Make use of the new `fetch-offline` stage: coreos/ignition#979 We run this between the `setup` and `fetch` stages (the latter possibly being skipped if networking is not required). We hit the same issue here that `coreos-copy-firstboot-network.service` hit, which is that we can't run before the `cmdline` hook because that runs *before* udev, but we want the `by-*` symlinks for `ignition-setup-user.service`. The hack we do here is to rerun the NM cmdline hook in case ignition dropped a snippet in `/etc/cmdline.d`. As mentioned in coreos/fedora-coreos-config#346, we'll be able to do this more cleanly once we run NM as a systemd service directly.
- Loading branch information
Showing
8 changed files
with
47 additions
and
18 deletions.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[Unit] | ||
Description=Ignition (fetch-offline) | ||
Documentation=https://github.com/coreos/ignition | ||
ConditionPathExists=/etc/initrd-release | ||
DefaultDependencies=false | ||
Before=ignition-complete.target | ||
After=basic.target | ||
|
||
# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files. | ||
# We run after the setup stage has run because it may copy in new/different | ||
# ignition configs for us to consume. | ||
After=ignition-setup-base.service | ||
After=ignition-setup-user.service | ||
Before=ignition-fetch.service | ||
|
||
# See hack below, as well as coreos-copy-firstboot-network.service. | ||
After=dracut-cmdline.service | ||
Before=dracut-initqueue.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
EnvironmentFile=/run/ignition.env | ||
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=fetch-offline | ||
# Hack: we need to rerun the NM cmdline hook because we run after | ||
# dracut-cmdline.service because we need udev. We should be able to move away | ||
# from this once we run NM as a systemd unit. See also: | ||
# https://github.com/coreos/fedora-coreos-config/pull/346#discussion_r409843428 | ||
ExecStart=/usr/bin/sh -c ". /usr/lib/dracut-lib.sh && . /usr/lib/dracut/hooks/cmdline/99-nm-config.sh" |
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
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
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