Services throwing exceptions may exit with exit code 0 #54

Closed
opened 2020-03-12 02:35:13 +00:00 by jamie · 6 comments
jamie commented 2020-03-12 02:35:13 +00:00 (Migrated from git.hazaar.io)

If a service exits with a code 0, then Warlock thinks that the service actually wants to exit, so it shuts it down, whereas in reality, the service should be restarted. It appears that if the service throws an exception on an event handler, the service will exit(0).

What probably should happen is, if the exception occurs in the main process, then restart the service, but if it's an event handler, simply log the error and carry on.

If a service exits with a code 0, then Warlock thinks that the service actually wants to exit, so it shuts it down, whereas in reality, the service should be restarted. It appears that if the service throws an exception on an event handler, the service will `exit(0)`. What probably should happen is, if the exception occurs in the main process, then restart the service, but if it's an event handler, simply log the error and carry on.
jamie commented 2020-03-12 02:35:13 +00:00 (Migrated from git.hazaar.io)

changed milestone to %1

changed milestone to %1
jamie commented 2020-03-12 02:35:33 +00:00 (Migrated from git.hazaar.io)

created merge request !26 to address this issue

created merge request !26 to address this issue
jamie commented 2020-03-12 02:35:33 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !26

mentioned in merge request !26
jamie commented 2020-03-12 02:55:11 +00:00 (Migrated from git.hazaar.io)

Looks like this was actually hard-coded in. I've removed that and now I'm trying to figure out a nice way of handling exceptions on the main loop so that services don't keep throwing them and filling up the logs. Exiting will allow the service to restart and potentially fix things, otherwise if it's not fixed, warlock will throttle the restarts if they happen too often.

Looks like this was actually hard-coded in. I've removed that and now I'm trying to figure out a nice way of handling exceptions on the main loop so that services don't keep throwing them and filling up the logs. Exiting will allow the service to restart and potentially fix things, otherwise if it's not fixed, warlock will throttle the restarts if they happen too often.
jamie commented 2020-03-12 03:10:18 +00:00 (Migrated from git.hazaar.io)

closed via merge request !26

closed via merge request !26
jamie commented 2020-03-12 03:10:18 +00:00 (Migrated from git.hazaar.io)

mentioned in commit f5efe6ff96

mentioned in commit f5efe6ff967cb8a24f900c4a0db6dba75459362f
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-warlock#54
No description provided.