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

[spec2x] Backport: Add ignition-subsequent.target for non-Ignition boots #132

Merged
merged 2 commits into from
Nov 7, 2019

Conversation

darkmuggle
Copy link
Contributor

@darkmuggle darkmuggle commented Oct 31, 2019

Backport: Add ignition-subsequent.target for non-Ignition boots

This is needed for Red Hat CoreOS work for encrypted disks. With the CoreOS Assembler commit 8bcd5608c473a959dae240a6488ce3451ddcdc69, the root= and rootflags kargs are removed. Red Hat CoreOS is also using b29bf79c5bd27d683519cf2e236f6f9088f6d127 from Fedora CoreOS that uses a service to mount and locate the root filesystem on first boot via ignition-ostree-mount-sysroot.service. The problem, however, is that there are different dependencies/ordering if we're doing the "Ignition boot" versus a "subsequent" boot.

Add a new target that's queued up if we detect we're doing a "subsequent" boot.

@darkmuggle
Copy link
Contributor Author

/cc @cgwalters Testing this now.

@ajeddeloh
Copy link
Contributor

Can you update the description? It currently doesn't make sense since this branch isn't used by fcos.

This is needed for Red Hat CoreOS work for encrypted disks. With the
CoreOS Assembler commit 8bcd5608c473a959dae240a6488ce3451ddcdc69, the
`root=` and `rootflags` kargs are removed. Red Hat CoreOS is also using
b29bf79c5bd27d683519cf2e236f6f9088f6d127 from  Fedora CoreOS that uses a
service to mount and locate the root filesystem on first boot via
`ignition-ostree-mount-sysroot.service`. The problem, however,
is that there are different dependencies/ordering if we're doing the
"Ignition boot" versus a "subsequent" boot.

Add a new target that's queued up if we detect we're doing
a "subsequent" boot.
@cgwalters cgwalters marked this pull request as ready for review November 5, 2019 14:12
@cgwalters
Copy link
Member

So...trying this out, a problem I'm seeing is that we really need the ignition-complete.target backport to spec2x because can't bind ignition-ostree-mount-firstboot-sysroot.service to initrd.target too, because it'd conflict.

@cgwalters
Copy link
Member

OK, trying to add ignition-complete to this PR suddenly starts enabling the https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-populate-var.service unit for example...but there's no ignition-mount.service in spec2x. Trying to stub that out.

This helps RHCOS rebase on the latest fedora-coreos-config
changes.

- Add a stub ignition-mount.service for ordering purposes
- Don't change the dependencies of all of the units just yet to
  minimize churn
@cgwalters
Copy link
Member

cgwalters commented Nov 7, 2019

OK, pushed another commit to this PR which adds ignition-complete.target.

Tested in concert with:

@dustymabe dustymabe added the spec2x Applies to the ignition spec2x branch label Nov 7, 2019
@dustymabe dustymabe changed the title Backport: Add ignition-subsequent.target for non-Ignition boots [spec2x] Backport: Add ignition-subsequent.target for non-Ignition boots Nov 7, 2019
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.

I haven't been following all the changes in this space, but LGTM from a trivial review.

@cgwalters
Copy link
Member

OK yep, this is all working in my testing.

@cgwalters cgwalters merged commit 8ac440e into coreos:spec2x Nov 7, 2019
@darkmuggle darkmuggle deleted the rootflagless branch November 8, 2019 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
spec2x Applies to the ignition spec2x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants