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

Remove OnFailure= from targets, put in services #188

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dracut/30ignition/coreos-gpt-setup@.service
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ After=%i.device
# with udev activity generated by sgdisk
Before=ignition-setup-base.service ignition-setup-user.service ignition-disks.service

OnFailure=emergency.target
OnFailureJobMode=isolate

[Service]
Type=oneshot
RemainAfterExit=yes
Expand Down
1 change: 0 additions & 1 deletion dracut/30ignition/coreos-teardown-initramfs.service
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Before=ignition-complete.target
Conflicts=initrd-switch-root.target umount.target
Before=initrd-switch-root.target

# Make sure if ExecStart= fails, the boot fails
OnFailure=emergency.target
OnFailureJobMode=isolate

Expand Down
7 changes: 0 additions & 7 deletions dracut/30ignition/ignition-complete.target
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
Before=initrd.target

# initrd.target has OnFailureJobMode=replace-irreversibly, which seems to
# cause unit restart loops in the initramfs if one of our units fails. Thus
# we intercept Ignition unit failures here and isolate to emergency.target.
# https://github.com/coreos/ignition-dracut/issues/115
OnFailure=emergency.target
OnFailureJobMode=isolate

# Make sure we stop all the units before switching root
Conflicts=initrd-switch-root.target umount.target
Conflicts=dracut-emergency.service emergency.service emergency.target
3 changes: 3 additions & 0 deletions dracut/30ignition/ignition-disks.service
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Before=ignition-mount.service
Before=initrd-root-device.target
Before=sysroot.mount

OnFailure=emergency.target
OnFailureJobMode=isolate

# This stage requires udevd to detect disk partitioning changes.
Requires=systemd-udevd.service
After=systemd-udevd.service
Expand Down
2 changes: 2 additions & 0 deletions dracut/30ignition/ignition-fetch.service
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ After=ignition-setup-base.service
After=ignition-setup-user.service
Before=ignition-disks.service

OnFailure=emergency.target
OnFailureJobMode=isolate

# Network may be used to fetch userdata content.
After=network.target
Expand Down
3 changes: 3 additions & 0 deletions dracut/30ignition/ignition-files.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

OnFailure=emergency.target
OnFailureJobMode=isolate

# Stage order: setup -> fetch -> disks -> mount -> files.
After=ignition-mount.service

Expand Down
1 change: 0 additions & 1 deletion dracut/30ignition/ignition-mount.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Before=ignition-complete.target
# Make sure ExecStop= runs before we switch root
Before=initrd-switch-root.target

# Make sure if ExecStop= fails, the boot fails
OnFailure=emergency.target
OnFailureJobMode=isolate

Expand Down
3 changes: 3 additions & 0 deletions dracut/30ignition/ignition-remount-sysroot.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ ConditionPathExists=/etc/initrd-release
DefaultDependencies=no
Before=ignition-diskful.target

OnFailure=emergency.target
OnFailureJobMode=isolate

After=sysroot.mount
ConditionPathIsReadWrite=!/sysroot

Expand Down
3 changes: 3 additions & 0 deletions dracut/30ignition/ignition-setup-base.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

OnFailure=emergency.target
OnFailureJobMode=isolate

# Stage order: setup -> fetch -> disks -> mount -> files.
Before=ignition-fetch.service

Expand Down
3 changes: 3 additions & 0 deletions dracut/30ignition/ignition-setup-user.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

OnFailure=emergency.target
OnFailureJobMode=isolate

# Stage order: setup -> fetch -> disks -> mount -> files.
Before=ignition-fetch.service

Expand Down
4 changes: 0 additions & 4 deletions dracut/30ignition/ignition-subsequent.target
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
Before=initrd.target

# See comments in ignition-complete.target
OnFailure=emergency.target
OnFailureJobMode=isolate

# Make sure we stop all the units before switching root
Conflicts=initrd-switch-root.target umount.target
Conflicts=dracut-emergency.service emergency.service emergency.target