Operating System - HP-UX
1753538 Members
5032 Online
108795 Solutions
New Discussion юеВ

Re: Starting Daemons Service Guard

 
SOLVED
Go to solution
Steve Darnell
Occasional Advisor

Starting Daemons Service Guard

I am configuring a Service Guard cluster to work with my company's software package, which makes use of processes that are normally spawned (and respawned if they ever terminate) via entries in /etc/inittab. Does anyone know whether we can use /etc/inittab to start our daemon processes on the Service Guard cluster, and if not, why not, and what the alternatives are?
6 REPLIES 6
James Burks
New Member

Re: Starting Daemons Service Guard

If the daemons are part of the software and the software is supposed to be started by the package then I would advise against trying to get it to work from the inittab file. You would more than likely have to have the cluster and your package started before starting you daemons from inittab and I don't know if you can synchronize these events.

A better method is too add the commands to start your daemons to the package startup script and bypass inittab. That way the daemons start when and where the package starts.
John Palmer
Honored Contributor
Solution

Re: Starting Daemons Service Guard

You best bet would be to configure the package monitor script to do what you currently do with init.

If you really have to use init, maybe you could configure your package start script to switch to an unused runlevel (4 or 5 maybe) and package close to switch back to 3. If you then set inittab to only respawn your application at that particular runlevel it may just work. You'd have to give it a good deal more thought though...
Steve Darnell
Occasional Advisor

Re: Starting Daemons Service Guard

Both of these replies are helpful - thank you.
I have a new idea - writing a script that turns my daemons on or off in inittab (by switching them between "off" and "respawn") and then runs "init q". I would then call this script from the package start/stop scripts.
I think that this just might work (and allow me to avoid using a new run-level to accomplish the same thing).
Anthony Goonetilleke
Esteemed Contributor

Re: Starting Daemons Service Guard

If I understand you correctly you want to start the SG daemon via inittab??
This is a big no no as the architecture of MCSG is based around things like cmcld etc.
If you have a test machine try sending a kill -8 signal to cmcld you will find that your machine will TOC.
SG depends on the status of these procs to decide wheather or not to reboot or change the custer over to a different node. Starting these procs via init will make MCSG go crazy. so dont do it.

If you are asking about starting your package via init dont do this either as the whole deal about SG is that when a package fails it will try and start it up again and if this fails several times (you set this limit) then it swaps the package over to the backup machine.
Minimum effort maximum output!

Re: Starting Daemons Service Guard

Hi,
I don't think it is a good idea to change the inittab file by MC/ServiceGuard, if your systems comes up after an unscheduled break-down, your processes will run on two systems in your network.
I would use the 'SERVICE' commands from the package control script:
# SERVICE_NAME[2]=pkg1c
# SERVICE_CMD[2]="/usr/sbin/ping"
# SERVICE_RESTART[2]="-R" # Will restart the service an infinite
# number of times.
This way, you can start commands and let them respawn bij MC/ServiceGuard.
Look at the comments in your package control script to see what the options are.

Regards,
Andre
melvyn burnard
Honored Contributor

Re: Starting Daemons Service Guard

you do not start any shared resource for a ServiceGuard package from within the /etc/inittab file!

All shared resources fo a package need to be started, monitored and stopped from within the package.
I recommend reading the manual Managing MC/ServiceGuard at:
http://www.docs.hp.com/hpux/ha
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!