[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with depend
From: |
Rory Toma |
Subject: |
Re: Problems with depend |
Date: |
05 Nov 2002 14:55:23 -0800 |
Here is one of my test cases...
# Monit control file
#
set daemon 30
set logfile syslog
set init
set httpd port 1400
allow localhost
allow localhost.localdomain
#
check postmaster with pidfile /var/run/postmaster.pid
start program = "/etc/rc.d/init.d/postgresql start"
stop program = "/etc/rc.d/init.d/postgresql monit-stop"
port 3306 type tcp
depend mr_server
check mr_server with pidfile /var/run/mr_server.pid
start program = "/etc/rc.d/init.d/mr_server start"
stop program = "/etc/rc.d/init.d/mr_server monit-stop"
port 9109 type tcp
depend llsched
depend rippie
check rippie with pidfile /var/run/rippie.pid
start program = "/etc/rc.d/init.d/rippie start"
stop program = "/etc/rc.d/init.d/rippie monit-stop"
port 9049 type tcp
check llsched with pidfile /var/run/llsched.pid
start program = "/etc/rc.d/init.d/llsched start"
stop program = "/etc/rc.d/init.d/llsched monit-stop"
port 9051 type tcp
depend dvrrecordmanager
check dvrrecordmanager with pidfile /var/run/dvrrecordmanager.pid
start program = "/etc/rc.d/init.d/dvrrecordmanager start"
stop program = "/etc/rc.d/init.d/dvrrecordmanager monit-stop"
port 9050 type tcp
depend cs
check cs with pidfile /var/run/cs_hw0.pid
start program = "/etc/rc.d/init.d/flash start"
stop program = "/etc/rc.d/init.d/flash monit-stop"
port 9052 with type tcp
check syslog-ng with pidfile /var/run/syslog-ng.pid
start program = "/etc/rc.d/init.d/syslog start"
stop program = "/etc/rc.d/init.d/syslog monit-stop"
check dhcpd with pidfile /var/run/dhcpd.pid
start program = "/etc/rc.d/init.d/dhcpd start"
stop program = "/etc/rc.d/init.d/dhcpd monit-stop"
check crond with pidfile /var/run/crond.pid
start program = "/etc/rc.d/init.d/crond start"
stop program = "/etc/rc.d/init.d/crond monit-stop"
I'd say for 3.1 we don't need to solve the complicated problem. In my
mind, starting everything is a special case, and we're optimized for
having things already running. I also didn't want to have to require
duplicate entries for depender and dependee. I was thinking of having
monit, during parse-time, add a flag to the dependant processes.
However, this requires that the object exists, which it may not.
For my application, I can live with a "messy" cold startup. It doesn't
happen very often, so I do not care if it's optimized, as long as
everything comes up. I think fixing this problem falls into the feature
that we had labelled as "init style functionality".
I did fix the other bug, though.
On Tue, 2002-11-05 at 14:04, Jan-Henrik Haukeland wrote:
> Rory Toma <address@hidden> writes:
>
> > I purposely did it this way. It would be difficult to implement the
> > other way. We'd have to have some kind of data structure that keeps
> > track of everything, rather than the pointers to the next processes
> > that we use now.
>
> Yes, browsing through my old algorithm book I think the data structure
> we are talking about has to be a graph (represented with a two-
> dimensional matrix), probably even a weighted graph. And it seems that
> the way to go is to use the Dijkstra's Algorithm to find the
> start/stop order route in the graph. The pages I'm looking at right
> now is loaded with heavy duty matematichs so it's probably going to be
> an interesting challenge %-)
>
> > I'll see if I can think of something simple.
>
> Simple is my favorite word, especially in combination with other words
> like, keep it simple. And it's probably an easier and simpler way to
> solve this than to bring in Dijkstra and advanced graph algorithms.
>
> > I think I can easily fix the previous problem, but not this
> > one. Perhaps we can better document the monitrc file and mention
> > that the order matters?
>
> But is it going to be okay with only fixing a right start-order? I
> haven't tested this _really_ (I should, and others should as well) but
> I will not be suprised if using a monitrc file with many entries and
> many internal dependencies can become a rather messy affair with lots
> of on-off-on-off-on program starting patterns. But maybe not, since
> the strategy you use are fairly simple? BTW, have you tested with say
> 10 entries and with at least 5 dependencies? Did it work as expected?
>
> I'm not so found of forcing the user to write entries in a certain
> order for this to work, since it's easy to forget. You'll find a smart
> solution for this won't you? We DEPEND on you :-)
>
> --
> Jan-Henrik Haukeland
>
>
> _______________________________________________
> monit-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/monit-dev
>
--
Rory Toma address@hidden
VP of Run Level 5 http://www.trs80.net
Digeo Digital http://www.digeo.com
signature.asc
Description: This is a digitally signed message part
- Problems with depend, Jan-Henrik Haukeland, 2002/11/05
- Re: Problems with depend, rory, 2002/11/05
- Re: Problems with depend, Jan-Henrik Haukeland, 2002/11/05
- Re: Problems with depend, Rory Toma, 2002/11/05
- Re: Problems with depend, Jan-Henrik Haukeland, 2002/11/05
- Re: Problems with depend,
Rory Toma <=
- RE: Problems with depend, Jan-Henrik Haukeland, 2002/11/05
- RE: Problems with depend, Rory Toma, 2002/11/06
- Re: Problems with depend, Jan-Henrik Haukeland, 2002/11/07
- Re: Problems with depend, Rory Toma, 2002/11/07
- Re: Problems with depend, Rory Toma, 2002/11/08
Re: Problems with depend, Rory Toma, 2002/11/05