Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make one-shot units more robust #311

Closed
margamanterola opened this issue Jan 5, 2021 · 0 comments · Fixed by flatcar-archive/coreos-overlay#768
Closed

Make one-shot units more robust #311

margamanterola opened this issue Jan 5, 2021 · 0 comments · Fixed by flatcar-archive/coreos-overlay#768
Labels
kind/feature A feature request

Comments

@margamanterola
Copy link
Contributor

Current situation
We have some one-shot units, like coreos-metadata, that don't get retried if they failed when they ran the first time. They just stay around as failed.

Impact
For coreos-metadata this means that if the metadata service is unavailable when the machine boots, but later becomes available, the machine never recovers.

Ideal future situation
To make this type of units more robust, we should add Restart=on-failure (as well as some delay, like say RestartSec=10 or maybe 1m, unfortunately there's no exponential backoff).

Additionally, we should consider adding RemainAfterExit=yes, so that these units don't get executed more than once it they get pulled in as as wanted/required. Otherwise, it could mean that an existing file gets lost when the server is unavailable later.

@margamanterola margamanterola added the kind/feature A feature request label Jan 5, 2021
pothos added a commit to flatcar-archive/coreos-overlay that referenced this issue Jan 7, 2021
When the metadata server is unavailable for some time the service did
not retry. Also, the service was triggered possibly multiple times
each time another service pulled it in which can cause problems if,
e.g., the service experiences a failure and corrupts the existing file
which could have been kept because rerunning wasn't needed.

Fixes flatcar/Flatcar#311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant