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

healthcheck and unhealthy not being utilized when using superise-deamon #717

Open
robinknaapen opened this issue Jul 1, 2024 · 1 comment
Assignees

Comments

@robinknaapen
Copy link

Description

When using the supervise-daemon I expect healthchecks to work as described in supervise-daemon-guide.md

What I found

When the process under the supervise-daemon crashes the service still has the status started.
Which is technically true since the supervise-daemon respawns the process with the given settings.

When using the supervise-daemon I can not utilize the healthcheck and unhealthy functions.

Example

# /tmp/service/service
exit 1
# https://github.com/OpenRC/openrc/blob/master/supervise-daemon-guide.md
supervisor=supervise-daemon
directory="/tmp/service"
command="$directory/service"

healthcheck_timer=1

healthcheck() {
   echo "heathcheck" >> /tmp/debug
   return 1
}

unhealthy() {
   echo "unhealthy" >> /tmp/debug
}

Given the above example, I expect the healthcheck and unhealthy to be utilized. But neither is ran.

When calling healthcheck via the service command: service <service name> healtcheck the healthcheck is ran, but not the unhealthy.

@robinknaapen
Copy link
Author

Edit:

I accidentally left the healthcheck my in test service script. This time I left the service run without crashing instantly and found that the healthcheck does run.

To my surprise, the healthcheck does not trigger after the instant crash, and neither does the unhealthy function.

I will play with the respawn variables tomorrow to see if this makes a difference and post about this later.

@navi-desu navi-desu self-assigned this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants