Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Add new ignition-fetch-offline.service #164

Merged
merged 2 commits into from
Jun 18, 2020
Merged

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Mar 30, 2020

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.

@jlebon jlebon force-pushed the pr/fetch-offline branch 2 times, most recently from 11025db to 5ab91da Compare March 30, 2020 20:06
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Mar 30, 2020
We want to move to a model where networking isn't unconditionally
brought up, but instead only if Ignition requires it.

Works with:
coreos/fedora-coreos-config#321
coreos/ignition-dracut#164
coreos/ignition#956
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Mar 30, 2020
We want to move to a model where networking isn't unconditionally
brought up, but instead only if Ignition requires it.

But I think we'll still have to keep supporting
`ignition_network_kcmdline` since it's kind of part of our API now that
it can be overridden via `ignition.firstboot`.

Works with:
coreos/fedora-coreos-config#321
coreos/ignition-dracut#164
coreos/ignition#956
@jlebon jlebon changed the title WIP: Add new ignition-fetch-offline.service Add new ignition-fetch-offline.service May 25, 2020
@jlebon jlebon marked this pull request as ready for review May 25, 2020 18:36
@jlebon
Copy link
Member Author

jlebon commented Jun 9, 2020

OK, this is the next PR in the list for conditional networking (coreos/fedora-coreos-tracker#443)!

Copy link
Contributor

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dracut/30ignition/ignition-fetch.service Outdated Show resolved Hide resolved
dracut/30ignition/ignition-check-neednet.sh Outdated Show resolved Hide resolved
dracut/30ignition/ignition-fetch-offline.service Outdated Show resolved Hide resolved
dracut/30ignition/module-setup.sh Show resolved Hide resolved
@jlebon
Copy link
Member Author

jlebon commented Jun 17, 2020

Updated for comments!

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one final suggestion, otherwise LGTM

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.
No reason to leak this outside the function.
@jlebon jlebon merged commit 2b669b0 into coreos:master Jun 18, 2020
@jlebon jlebon deleted the pr/fetch-offline branch June 18, 2020 19:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants