[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: starting service order
From: |
Sebastien ESTIENNE |
Subject: |
Re: starting service order |
Date: |
Tue, 06 Jul 2004 00:11:44 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7) Gecko/20040616 |
To provide such a service, you should define:
1) the ability for a dependency to fail
Yes that's i was asking if this feature exist, it could be implemented
like this
depends on apache_bin can fail
or a new keyword that would do the same thing named "before"
2) a kind of ordering, or at least, the ability to not startup the
subsequent service in the list if the previous did not already completed
to startup _without_ using a dependency
it could be implemented by keywords like before/after
Gentoo linux already provide this functionnality (look here:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=5#doc_chap4
)
you can define order with before after
dependencies need/use and also provide
for example you can say that qmail "provide mta" and "need net"
and that nagios "need mta"
so the system knows that he must start qmail before nagios (if you had
use the "use" keyword instead of "need" it means that qmail can fail
it's okà
"provide" is also because you can say that many service provide the same
functionnality, eg: mta -> qmail, postfix, exim
3) some tool to easily rearrange the services (a chkconfig-like tool) 4)
the ability tu support different runlevels
I wrote this tool, it was easy, i just modified the default tool from
gentoo (it was just a matter of 5 lines)
I did it like this:
in /etc/monitrc i added "include /etc/monit.d/autostart/*"
in /etc/monit.d/ i put a file by service (eg: apache postfix mysql)
and the tool just write or remove a link from /etc/monit.d/ in
/etc/monit.d/autostart
so i have the exact same functionnality as a tool like chkconfig
(i don't know if you use gentoo, but now i add services like this:
rc-update add apache monit)
you said that monit is only good in specialized situation, or when
customized, it's true, but you can define default and then allow the
user to provide custom settings without modifying the default install,
using include:
the default, would only check for pid, and listening port and then the
user can overide things or adding things by including his configuration:
eg:
/etc/monit.d/system/SERVICE <- contain all default service config
and each SERVICE contain a line like this at the end: include
/etc/monit.d/user/SERVICE
so when a user want to customized apache for example, he just have to
create a file /etc/monit.d/user/apache
I think that monit can remplace the default system, because the onlyt
things that the default init system has to do, is stating/stopping
system in the right order nothing more
and i don't see why monit couldn't do this?
for example djb's daemontools where built to manage services (they
manage qmail/djbdns) and monit seems to be a daemontools++. too bad he
also missed the ability to define services start order...
--
Sebastien ESTIENNE
Administrateur Système et Réseaux
www.ovibes.net
- starting service order, Sebastien ESTIENNE, 2004/07/05
- Re: starting service order, Marco Ermini, 2004/07/05
- Re: starting service order,
Sebastien ESTIENNE <=
- Re: starting service order, Jan-Henrik Haukeland, 2004/07/06
- Re: starting service order, Sebastien ESTIENNE, 2004/07/06
- Re: starting service order, Martin Pala, 2004/07/06
- Re: starting service order, rory toma, 2004/07/06
- Re: starting service order, Christian Hopp, 2004/07/07
- Re: starting service order, Jan-Henrik Haukeland, 2004/07/07
Re: starting service order, Marco Ermini, 2004/07/06