Re: runit-scripts gone, supervision-scripts progress

From: Laurent Bercot <>
Date: Sat, 03 Jan 2015 10:23:01 +0100

On 03/01/2015 01:13, Avery Payne wrote:
> I'm thinking "spawn to background and exit just after that".

  That solves the problem I mentioned, but creates other ones.

  If ./finish is about cleanup, and you background it, then ./run
may start again before the cleanup has completed, so there will
be competition for resources, and race conditions.
  If the service starts again, then dies again, you will have two
concurrent ./finish processes. More race conditions, unless they
are reentrant, which is a heavy constraint on a finish script.
  If the service is in a failure loop and dies faster than
cleanup completes, you will have an accumulation of ./finish
processes, which will end up eating a lot of resources. You do
not want to risk cascading failure.

  All in all, I think it's safer not to background ./finish, and
just make sure it doesn't block.

> Right now I'm having an internal dialog about if I should have an
> environment variable that "hints" the framework to the scripts, which in
> turn would allow me to support framework-specific features. I like the
> idea but I'm concerned that it will be unmaintainable without templates.

  Welcome to the wonderful world of integration!
  As you must have guessed by now, DJB, Wayne, Gerrit and I regularly
meet in secret to find new ways to make you pull your hair out, and
we've decided that we really went too easy on you in 2014, so expect
more work in 2015. ;)

Received on Sat Jan 03 2015 - 09:23:01 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC