Operating System - HP-UX
1777318 Members
3248 Online
109068 Solutions
New Discussion юеВ

A service restart question

 
SOLVED
Go to solution
likid0
Honored Contributor

A service restart question

Hy,

I have a little doubt, that from what I read in the service guard manual doesn't give me a clear idea,

When you create a service on a package.

when you put in the service the -r 2 restart option so it restarts 2 times the aplication in case it fails, what does the cluster exactly do?

Does it run a:

Custom stop and Custom start ?
just a Custom start ?
or only it runs again the service_cmd )

I imagine the first, but could you confirm?
Windows?, no thanks
12 REPLIES 12
melvyn burnard
Honored Contributor

Re: A service restart question

It will try to restart teh servcie 2 times, then consider it aq failure and halt the package on that node.
If the switching variables are then set correctly, the package will switch
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
likid0
Honored Contributor

Re: A service restart question

Yes, but my doubt is, when it restart the service, what does it do?

stop start the hole package?

or just restart what you put in the service_cmd ?

because normaly what you have on the service_cmd is the monitor not the aplication
Windows?, no thanks
melvyn burnard
Honored Contributor

Re: A service restart question

as it's name implies, it tries to restart the service, i.e. the monitor
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Sharma Sanjeev
Respected Contributor

Re: A service restart question

Hi

Yes it restart the Service not complete package

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Emil Velez
Honored Contributor

Re: A service restart question

The system runs the package script with the halt option so it does try to halt gracefully unless you use the option "SERVICE_FAIL_FAST enabled" then the system does a panic TOC
Deepak Kr
Respected Contributor
Solution

Re: A service restart question

I hope you must have read in the same manual that serviceguard monitors the processes running in package applications using a script called package monitoring script.

This script keep on checking services and if any abruption or issue found with the state with service on current node it reads this paramters to restart service(s).

Depending on package switching parameters package gets shifted.

So in short, answer to your question is yes..it reads custom start..


regards,
deepak
"There is always some scope for improvement"
likid0
Honored Contributor

Re: A service restart question

So . let's say if your service is a monitor of the aplication.

lets say we have:


service=/app/app.sh monitor
custom start=/app/app.sh start
custom stop=/app/app.sh stop
and service restarts=3

so if a kill the app the monitor exits and dies, then a restart happens, and it's going to run again the monitor:

/app/app.sh monitor

and because my app is down because I killed it the monitor will exit again, because its not starting the app doing a /app/app.sh start.

So in the monitor script you need to put the app start ?


any of you have and example monitor a script for a simple app ?


Thnx
Windows?, no thanks
Deepak Kr
Respected Contributor

Re: A service restart question

Hi,

Answer is it it will restart package. Whole bunch of services that are started using customer defined run commands.

On other hand if you are defining any service startup in customer defined run commands area then service you specify in service_cmd will get restarted.

Hope this will clear your doubt...

Regards,
Deepak
"There is always some scope for improvement"
likid0
Honored Contributor

Re: A service restart question

no, not really. i Still have the same question, If i put my monitor script on the service_cmd, and my app start script in the custom section, when the monitor dies how restarts my app?
Windows?, no thanks
melvyn burnard
Honored Contributor

Re: A service restart question

Your application is NEVER restarted by the service, the service is simply a method of checking to see that vital processes or things are around so that the application is able to work.
A service restart simply tries to restart that monitoring IN CASE something prevented the monitor from verifying the required item(s) was actually available.


For example, the Oracle toolkit monitors to see whether specific processes are running, without which Oracle cannot work. If these fail, then the service fails, resulting in the package halting and being moved to another node.

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
likid0
Honored Contributor

Re: A service restart question

Ok, Melvin understood, but then I have the next question, if you want to have your aplication restarted 2 times(for example), before stoping tha package and going to another node, which is the best way to do it?
Windows?, no thanks
Masud Parvez
Valued Contributor

Re: A service restart question

Depend upon your application. If it is Oracle or SAP then not better to go for restart application service. If it is named or nfs then better use this.