Skip to content

Commit

Permalink
fetch: don't run if fetch-offline fetched a config
Browse files Browse the repository at this point in the history
It's possible that `fetch-offline` does successfully fetch and cache a
config but still touch `/run/ignition/neednet`. That stamp file is an
API between Ignition and the OS that Ignition will need networking to
fully process it. But the config itself might've successfully been
fetched (and the only thing that requires networking is e.g. a remote
file). In those cases, there's no point in running `fetch` and have it
query the provider again.
  • Loading branch information
jlebon committed Aug 28, 2020
1 parent ec49918 commit 0b5a9e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dracut/30ignition/ignition-fetch.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ DefaultDependencies=false
Before=ignition-complete.target
After=basic.target
ConditionPathExists=/run/ignition/neednet
# Don't run if the `fetch` stage successfully fetched a config
ConditionPathExists=!/run/ignition.json

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
# We run after the setup stage has run because it may copy in new/different
Expand Down

0 comments on commit 0b5a9e5

Please sign in to comment.