cloudfoundry / bpm-release

isolated bosh jobs
Apache License 2.0
34 stars 28 forks source link

Customize shutdown signal to send SIGINT to Postgres #152

Closed bgandon closed 3 years ago

bgandon commented 3 years ago

Hi,

After submitting cloudfoundry/bosh#2320 as a “short path PR”, we've implemented here a new sutdown_signal configuration in BPM.

This new config accepts INT or TERM (the default), so that BPM can properly trigger the Fast Shutdown Mode of Postgres. This simplifies things, and doesn't require a drain script for the standard requirement that the executable expects a SIGINT instead of a SIGTERM.

After this is merged, we' submit a refactor PR in cloudfoundry/bosh so that it is used instead of the drain scripts we have proposed in cloudfoundry/bosh#2320

Co-authored-by: Jörg Weisbarth

bosh-admin-bot commented 3 years ago

This pull request was marked as Stale because it has been open for 21 days without any activity. If no activity takes place in the coming 7 days it will automatically be close. To prevent this from happening remove the Stale label or comment below.

ragaskar commented 3 years ago

Hi:

We looked at this commit and noticed that the behavior of bpm stop <process> when the process doesn't exist was changed. It previously printed a message about missing process + exited successfully, now it prints a message about missing configuration and exits with a failure code. Was this intentional? It looked like it could be fixed with the following commit: https://github.com/cloudfoundry/bpm-release/commit/8ead4d3cb26d9fdf68969b779596b4eee925c3f5

what do you think?

Also, would you be open to/interested in supporting all signals that kill takes?

selzoc commented 3 years ago

Hi @bgandon ! @ragaskar and I are going to merge this and do some follow-on work before cutting a release. Thanks for the contribution!

selzoc commented 3 years ago

This is now in release v1.1.14 🎉