Re: daemontools respin?
Gerrit Pape <[email protected]> Thu, 17 Jun 2010 07:47:24 +0000 (UTC)
| Newsgroups | gmane.comp.sysutils.bgware |
|---|---|
| Message-ID | <[email protected]> |
Charlie Brady <charlieb-bgware <at> budge.apana.org.au> writes: > On Wed, 16 Jun 2010, Bernhard Graf wrote: > > You mean when B depends on A to be up, B may check availabily of A? > > > > Of course you can do it this way, but then B may be forced to have > > detailed knowledge about A's guts. > > Maybe. But in general it only needs to know what its own needs are. > > As Bruce G has suggested, a 'check' script provided by A can be used by B. It's even simpler. If a service knows what it needs to properly start up and function, it simply should exit if its prerequisites are not available, no matter which other service provides them. The supervisor will start it up again, and chances are good that now the services it depends on are up and running. If not, it'll try again. Actually I introduced the ./check script only for those service daemons that do not check whether prerequisites are available and start up nevertheless, but then do not function properly. Better would be to have this misbehavior in those service daemons fixed, and so, due to supervising and restarting, the dependencies sort out automatically, without defining them at all. Regards, Gerrit.