-
Notifications
You must be signed in to change notification settings - Fork 315
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
post-run hook doesn't re-run on exit 1 #2364
Comments
I, too, have just expected it to be re-run, and was surprised it didn't. So, that's another teeny-tiny data point 😉 |
Hi,
Yeah I've seen a few people put post-run functionality into health-check
with some logic to only run once, not pretty.
I've actually got a PR for this which does the following:
- Don't run the post-run hook till there has been a successful health check
- Re-run the post-run hook until success
I'll clean it up and try to get it through today.
Cheers,
James
…On Mon, Aug 14, 2017 at 10:31 PM, Stephan Renatus ***@***.***> wrote:
I, too, have just expected it to be re-run, and was surprised it didn't.
So, that's another teeny-tiny data point 😉
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2364 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABKRo0fvMACqD-TI-Syd8rFo30k-8oCqks5sYD4ngaJpZM4NajO0>
.
|
@jamessewell any news on that PR? Is this something still relevant today? thanks! |
Relevant case: habitat-sh/core-plans#1674 (comment) |
This really must have. Use-case:
Also it is not clear how much to wait in step 3? 1 second, 15 seconds, 8 minutes? Will service actually restart while post-run hook is running? Or hook gets killed? Or service will wait? Too many questions. Immediate exit with non-zero code is better. |
Taking some questions posed by @davidMcneil and putting them here (along with some thoughts) for posterity and broader discussion. As usual, all this stuff is open to discussion with anyone that has thoughts to contribute! Should
|
Also, @jsirex's comments above:
suggest that some kind of overall state machine for a service will be important in order to properly track these kinds of transitions. |
Running hab from hab-0.22.1-20170509234454-x86_64-linux on CentOS 7.2, deploying into Docker.
It looks like when a unsuccessful code is encountered from the
post-run
hook script the script is not run again, like we see withinit
,run
etc...The use case for this would be:
run
post-run
The two options I can see here are block in
run
until my service becomes available for config, or have thepost-run
script accept anexit 1
as requiring anotherpost-run
pass.If this is the intended functionality ideas are welcome!
The text was updated successfully, but these errors were encountered: