autodesk-cloud / ochopod

Your friendly orchestration overlay over Mesos, K8S and more !
http://autodesk-cloud.github.io/ochopod/
Apache License 2.0
122 stars 20 forks source link

SIGTERM event for entry point #9

Closed ghost closed 9 years ago

ghost commented 9 years ago

If I use ochopod as the entrypoint for an app will it correctly handle SIGTERM events?

opaugam commented 9 years ago

Explain the use-case.

By default ochopod will SIGTERM the process it controls (say .. kafka) typically if it needs to re-configure on the fly or if you use the CLI to phase out some containers. It will wait for up to one minute and then SIGKILL in a last resort. The teardown procedure can be customized too in your pod script.

Just SIGTERM-ing the sub-process is fine for 99% of the cases. I use it to implement connection draining on my API tiers for one of our projects..

ghost commented 9 years ago

Okay. Thanks for the info! I was making sure the default case propagates the SIGTERM to the sub-process for tidy cleanup.

opaugam commented 9 years ago

sure np - make sure to checkout the latest ochothon .. i added support for custom health-checks at the cluster level (so for instance being able to run kafka-topics and check if all topics have a leader .. that kind of thing), with reporting in the command line tools !