1

I have a set of auto-scaled EC2 instances that run a daemon managed by supervisord on each instance.

I want to differentiate the clean-up behavior for the following cases:

  • when shutting down instances (e.g., scaling-in)
    i.e., shutting down supervisord itself
    -> do an extra clean-up process
  • when I manually stop the daemon for maintenance (e.g., upgrades)
    i.e., keeping supervisord alive but only shutting down my daemon
    -> do a fast clean-up process

Currently supervisord has only stopsignal configuration which sends the same signal in both cases. It seems that the authors decided not to support extra reload/restart signals for graceful shutdown. (In my case, I want to distinguish two shutdown signals depending on the shutdown reason, not wanting to have reload/restart signals, though.)

How could I make my daemons to distinguish those two cases (with supervisord or maybe without supervisord)?

Achimnol
  • 109
  • 1
  • 5

0 Answers0