coreos / coreos/ignition

Try to remove OnFailure from ignition-complete.target

Open
#1,053 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
974
Forks
296
Avg merge
6d 14h
Merged PRs (30d)
9

Description

ignition-diskful.target is (sometimes) pulled in by ignition-complete.target, which is pulled in by initrd.target. If any unit fails which is required by either of those Ignition targets, we would like to fail the boot and drop to an emergency shell.

initrd.target has:

OnFailure=emergency.target
OnFailureJobMode=replace-irreversibly

But relying on that doesn't work. If we do, and a unit fails, we loop indefinitely in the initramfs. That doesn't seem possible within the systemd depsolver, so it seems plausible that, as @jlebon suggested, initrd-switch-root.service is involved in the loop.

We're currently avoiding this by putting our own OnFailure clause in ignition-complete.target:

OnFailure=emergency.target
OnFailureJobMode=isolate

This fixes the problem for everything chaining up to ignition-complete.target. (Note the isolate; the problem can also be fixed by putting OnFailureJobMode=isolate in a drop-in for initrd.target.) But it'd be nice to track this down and conclusively determine why we need it, or whether this should be fixed upstream.

Note that the test case in the above bug no longer works on F30/F31.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dependency chain among ignition-diskful.target, ignition-complete.target, initrd.target, and initrd-switch-root.service, then review the linked Bugzilla report. Investigate why OnFailure=emergency.target loops in the initramfs and why OnFailureJobMode=isolate avoids it. Done means documenting the cause and determining whether the workaround belongs upstream, with a reproducible test if possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.