Re: [Zope3-dev] Is there an alternative to zdaemon?
Jim Fulton wrote at 2006-12-22 15:55 -0500: > >Thoughts? We are using "zdaemon" widely and would be sad to loose it. The "underdocumented" argument is unjustified in my view: * "zdaemon" comes with reasonable "online" documentation (the "help" command) * like for all "zconfig" based programs, essential documentation can be found in the schema file. As the configuration options have been carefully documented (also quite common for "zconfig" based programs), this is sufficient documentation for the configuration. * There are other forms of documentation than "testable documentation (aka "doctest"s). -- Dieter ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
On Fri, Dec 22, 2006 at 11:38:33PM +0100, Sascha Ottolski wrote: > > At my previous job, we used daemontools, which was OK, except we never > > found a solution to the problem of "I want to get email notifications > > when the system is restarting unexpectedly, but I don't want my mail > > to get a DOS attack when the system can't start successfully so it > > keeps restarting forever". > > hmm, what about: > > let the run script touch or write some status file; the very same script > would > send an email on a "normal" restart, but may stop to do so if the status file > is to new. hmm, thinking further, the script could even delay or block the > restart, if desired. i guess the "run" script could also be written in > python. Sure, but it's such a common need that ideally I'd like that to be taken care of for me :-) supervisor normally gives up after some number of restart attempts, which is fine with me. -- Paul Winkler http://www.slinkp.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
Sascha Ottolski wrote: Am Freitag, 22. Dezember 2006 23:04 schrieb Jim Fulton: An abnormal exit is an exit due to some error, such as a segmentation fault or running out of memory. > in the sense, how would the supervisor know thats it's abnormal? It can check the exit status. Normal shutdowns typycally exit with status 0. zdaemon (and supervisor2, which was obviously inspired by zdaemon) has an exit-codes option to configure which exit codes are normal. If the supervisor exists with one of these exit codes, it should not be restarted. i see. however, i guess the idea of a supervisor is just for such cases: to take care to restart a server that broke. there's "svc -o" to run a service only "once", which comes handy if one is not sure if the server will survive a start. Yes what i think to make more sense would be that the supervisor could detect if a server is restarted too frequently. in my experience, thats more often a situation that needs special attention. Yes, that's a case that zdaemon and supervistor2 handle. Yu also want an application to be able to exit normally without being restarted. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
Am Freitag, 22. Dezember 2006 23:23 schrieb Paul Winkler: > On Fri, Dec 22, 2006 at 05:04:37PM -0500, Jim Fulton wrote: > > Sascha Ottolski wrote: > > >And the python coded Supervisor2 made by Chris McDonough > > >http://www.plope.com/software/supervisor2/ > > > > This is interesting. > > We've been using supervisor (previous version) for all our zope > applications for a year or so. Works as advertised, pretty easy to set > up. > > At my previous job, we used daemontools, which was OK, except we never > found a solution to the problem of "I want to get email notifications > when the system is restarting unexpectedly, but I don't want my mail > to get a DOS attack when the system can't start successfully so it > keeps restarting forever". hmm, what about: let the run script touch or write some status file; the very same script would send an email on a "normal" restart, but may stop to do so if the status file is to new. hmm, thinking further, the script could even delay or block the restart, if desired. i guess the "run" script could also be written in python. Cheers, Sascha -- Lalisio GmbH www.lalisio.com Puschkinstraße 1 fon +49-(0)361/541 43 80 99084 Erfurt fax +49-(0)361/541 43 79 [EMAIL PROTECTED] ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
Am Freitag, 22. Dezember 2006 23:04 schrieb Jim Fulton: > An abnormal exit is an exit due to some error, such as a segmentation > fault or running out of memory. > > > in the sense, how would the > > > > supervisor know thats it's abnormal? > > It can check the exit status. Normal shutdowns typycally exit with > status 0. zdaemon (and supervisor2, which was obviously inspired by > zdaemon) has an exit-codes option to configure which exit codes > are normal. If the supervisor exists with one of these exit codes, > it should not be restarted. i see. however, i guess the idea of a supervisor is just for such cases: to take care to restart a server that broke. there's "svc -o" to run a service only "once", which comes handy if one is not sure if the server will survive a start. what i think to make more sense would be that the supervisor could detect if a server is restarted too frequently. in my experience, thats more often a situation that needs special attention. > > > FWIW, there's also "runit", obviously developed in the same spirit but > > independend of daemontools: http://smarden.org/runit/useinit.html > > This wants to run as process 1. This seems a bit intrusive. yes and no. the page i linked to explains how to use it while _not_ replacing init. in that mode it seems to be quite like daemontools (see "The sv program", "The runsvdir program", "The runsvchdir program" and "The runsv program" on the main runit page). i guess there is at least some support for your use case, see http://smarden.sunsite.dk/runit/runsv.8.html: one can define a "finish" script, which is started with the exit code of the supervised process as one of its parameters. Cheers, Sascha -- Lalisio GmbH www.lalisio.com Puschkinstraße 1 fon +49-(0)361/541 43 80 99084 Erfurt fax +49-(0)361/541 43 79 [EMAIL PROTECTED] ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
On Fri, Dec 22, 2006 at 05:04:37PM -0500, Jim Fulton wrote: > Sascha Ottolski wrote: > >And the python coded Supervisor2 made by Chris McDonough > >http://www.plope.com/software/supervisor2/ > > This is interesting. We've been using supervisor (previous version) for all our zope applications for a year or so. Works as advertised, pretty easy to set up. At my previous job, we used daemontools, which was OK, except we never found a solution to the problem of "I want to get email notifications when the system is restarting unexpectedly, but I don't want my mail to get a DOS attack when the system can't start successfully so it keeps restarting forever". -- Paul Winkler http://www.slinkp.com ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
Sascha Ottolski wrote: Am Freitag, 22. Dezember 2006 21:55 schrieb Jim Fulton: Does anyone know of something that does what zdaemon does? daemontools seems somewhat close: http://cr.yp.to/daemontools.html Going from the documentation, it doesn't seem to be as clever about application restart. The documentation says nothing about distinguishing between normal and abnormal restarts or avoiding useless restarts when there are start-up errors. daeomontools are definetely worth looking, i use it for some years now, and never had problems. it wasn't updated in almost five years, since it just works. you are right about the restart issue: if a supervised process dies, it's restarted, no matter why it died. what would an abnormal restart be, that should not take place, anyway? An abnormal exit is an exit due to some error, such as a segmentation fault or running out of memory. > in the sense, how would the supervisor know thats it's abnormal? It can check the exit status. Normal shutdowns typycally exit with status 0. zdaemon (and supervisor2, which was obviously inspired by zdaemon) has an exit-codes option to configure which exit codes are normal. If the supervisor exists with one of these exit codes, it should not be restarted. FWIW, there's also "runit", obviously developed in the same spirit but independend of daemontools: http://smarden.org/runit/useinit.html This wants to run as process 1. This seems a bit intrusive. And the python coded Supervisor2 made by Chris McDonough http://www.plope.com/software/supervisor2/ This is interesting. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Is there an alternative to zdaemon?
Am Freitag, 22. Dezember 2006 21:55 schrieb Jim Fulton: Does anyone know of something > that does what zdaemon does? daemontools seems somewhat close: > > http://cr.yp.to/daemontools.html > > Going from the documentation, it doesn't seem to be as clever about > application restart. The documentation says nothing about > distinguishing between normal and abnormal restarts or avoiding > useless restarts when there are start-up errors. daeomontools are definetely worth looking, i use it for some years now, and never had problems. it wasn't updated in almost five years, since it just works. you are right about the restart issue: if a supervised process dies, it's restarted, no matter why it died. what would an abnormal restart be, that should not take place, anyway? in the sense, how would the supervisor know thats it's abnormal? FWIW, there's also "runit", obviously developed in the same spirit but independend of daemontools: http://smarden.org/runit/useinit.html And the python coded Supervisor2 made by Chris McDonough http://www.plope.com/software/supervisor2/ i myself have no experinces with these two, though. Cheers, Sascha -- Lalisio GmbH www.lalisio.com Puschkinstraße 1 fon +49-(0)361/541 43 80 99084 Erfurt fax +49-(0)361/541 43 79 [EMAIL PROTECTED] + AKTUELLER HINWEIS (November 2006) Wussten Sie schon, dass Sie mit der Literatursuchmaschine von Lalisio in mehr als 12 Millionen Titeln suchen und bei vielen Publikationen sogar die Abstracts lesen können? Testen Sie unser Angebot unter www.lalisio.com! + ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com