-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Issue
If the OS process related to a pebble service is killed (like using pkill --signal SIGKILL -f process_name
) and that service has a health check that instructs pebble to restart it on a check failure (on-check-failure
field from the pebble layer spec), pebble tries to restart the process but finishes with an no such process
error. The number of check failures continues to grow and pebble doesn't try to, for example, just start the service, as there is no old OS process for that service to be stopped before the service start again.
There are more details in an example repo that I used to test that behaviour. I added some more description and some logs comparing what happens with pebble and also when using another tool, in that case supervisor, to start the service and later kill the OS process.
Is there a way to solve that issue (making the service restart correctly using the pebble checks) using other fields from the pebble layer? I found a workaround that I implemented in my charm code, but I would like to confirm if this is a bug or not.