Chris McDonough <[email protected]> writes:

> On Wed, 2010-10-27 at 10:16 -0700, Alexandre Conrad wrote:
>> Hello list,
>> 
>> I have a feature request if this one isn't in the works already.
>> 
>> To avoid service interruption, it would be great to have a "recycle"
>
>> command to restart the servers incrementally. So rather than using:
>> 
>> supervisor> restart <gname>:*
>> 
>> where all processes would be stopped then started again, we could have:
>> 
>> supervisor> recycle <gname>:*
>> 
>> where supvervisor would iterate over each process to stop *and*
>> restart them one-by-one allowing zero service downtime.
>> 
>> I could have a look at the code as I have Python skills, but before I
>> start something I wanted to know what would be the chances for that
>> idea to be accepted.
>
> This is something I think we'd all like.  The thing you describe above
> assumes that the processes that need restarting are part of a
> homogenous group of processes. We probably eventually want something
> more general, like a dependency graph. For example, there are
> "heterogenous groups" (groups that have different processes as
> members), and of course processes that aren't in a group.  It would be
> useful to be able to indicate the start-stop ordering/dependencies of
> things that aren't also in a homogenous group.  The beg-off on that
> has been that interprocess dependency management is possible to do via
> an event listener.
>
> That said, I think maybe making homogenous groups behave this way with
> respect to a restart would be useful.  Having a separate command for
> this seems to make sense, because it implies a slightly different set
> of semantics: "recycle" means "I want to restart all processes in this
> group, but if one fails to start, I want to stop trying to restart the
> rest" (if I understand correctly), but "restart" means "I want to
> restart all of these processes, and I don't care if one fails to
> restart".

It would also be very useful to be able to run arbitrary commands, not
necessarily or strictly subprocess management, on program start and/or
stop.  A couple of things I'd like to use this for:

  - taking a load balancer back-end down before stopping and bringing it
    back up after starting a program
  - priming a backend with a few requests after starting and before
    bringing the back-end back up

I've been trying to figure out what the right way to think about this
should be.  The program should not successfully stop without first
taking down the back-end nor should a start be considered successful
without successfully priming the program and then bringing the back-end
back up.  So what's the right place to do this?  Is it even possible to
achieve this with events or a wrapper script?  Should this be something
that supervisor core does?  Is this outside the scope of supervisor?

Ross

_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to