Try to remove OnFailure from ignition-complete.target
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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