Skip to content

Commit

Permalink
coreos-teardown-initramfs-network: order ExecStop after other ignitio…
Browse files Browse the repository at this point in the history
…n units

We want to run the teardown after all other Ignition stages
have run because some platforms (like Packet) do remote status
reporting for each Ignition stage. Since we are tearing down
the networking using an ExecStop we need to make sure we run
the ExecStop *after* any other ignition*.service unit's ExecStop.
The only other one right now is ignition-mount that has an ExecStop
for doing an unmount. Since the ordering for ExecStop is the
opposite of ExecStart we need to use `Before=ignition-mount.service`.

Partial fix for coreos/fedora-coreos-tracker#440

This would most likely not be necessary if Ignition cached an
empty result: coreos/ignition#950
  • Loading branch information
dustymabe committed Mar 30, 2020
1 parent c44670a commit ded5d30
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dracut/30ignition/coreos-teardown-initramfs-network.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
[Unit]
Description=Tear down initramfs networking
DefaultDependencies=false

# We want to run the teardown after all other Ignition stages
# have run because some platforms (like Packet) do remote status
# reporting for each Ignition stage. Since we are tearing down
# the networking using an ExecStop we need to make sure we run
# the ExecStop *after* any other ignition*.service unit's ExecStop.
# The only other one right now is ignition-mount that has an ExecStop
# for doing an unmount. Since the ordering for ExecStop is the
# opposite of ExecStart we need to use `Before=ignition-mount.service`.
# https://github.com/coreos/fedora-coreos-tracker/issues/440
Before=ignition-mount.service
Before=ignition-complete.target

# Make sure ExecStop= runs before we switch root
Expand Down

0 comments on commit ded5d30

Please sign in to comment.