mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-12 06:40:35 +01:00
exit_hook isn't called after request_failure #508
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @glance- on GitHub (Nov 27, 2020).
After request_failure is called, dehydrated just does exit 1, and not _exiterr which calls exit_hook.
I expected every run to have equal amounts of startup_hook and exit_hook calls.
@j-ed commented on GitHub (Nov 27, 2020):
Con you please provide more detailed information about the used script version, your configuration, the messages shown if you run into such an error. I might be wrong, but for me it looks like the
_exiterrfunction is called if the request_failure hook returned with a non-zero exit code and the exit hook is being called right after an error message has been displayed on the screen?!@glance- commented on GitHub (Nov 30, 2020):
I'm using current master, and that code haven't changed in quite a while.
I'm using hooks to integrate dehydrated with the rest of our system, and one of those tasks is that we remount the dehydrated config directory rw in the startup_hook and remount it ro in the exit_hook.
Yes, _exiterr is called if request_failure hook fails, but if request_failure hook just returns zero or isn't implemented, exit_hook is never called, dehydrated just does a exit 1. This is the only exit point from dehydrated where exit_hook isn't called.
@lukas2511 commented on GitHub (Dec 10, 2020):
Should be fixed now.
@glance- commented on GitHub (Dec 10, 2020):
Nice, Thanks.