Operating System - HP-UX
1833178 Members
3559 Online
110051 Solutions
New Discussion

How can I set some kind of order in package fail

 
SOLVED
Go to solution
Sebastien Masson
Valued Contributor

How can I set some kind of order in package fail

I have three node in cluster with 5 package on each host.

Someone know how MC/SG start package on the host because some of my package need to start after some other package (A kind or requisite)...

7 REPLIES 7
Sanjay_6
Honored Contributor

Re: How can I set some kind of order in package fail

Hi Sebastian,

there is no order in packge failure and startup. Each packge is expected to behave independently and is not expected to be dependent on another package.

Hope this helps.

Regds
Sridhar Bhaskarla
Honored Contributor

Re: How can I set some kind of order in package fail

Hi Sebastian,

Unfortunately, we cannot specify the order in which the packages are to be started. You need to put it in your package run/halt scripts. It will be bit complicated.

For ex., if you have package1 and package2 and package 2 is dependent on package1, then you will put checks in each package script.

package 1:

Check to see if package 2 is running. If so, bring it down and start the processes of package 1.

package 2:

check to see if package 1 is running. If so, start the processes of package 2. Otherwise, do not start.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Uday_S_Ankolekar
Honored Contributor

Re: How can I set some kind of order in package fail

Hi,

For controling sequence for the package starting look at this thread.
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=2e5335621631482a88/screen=ckiDisplayDocument?docId=200000056929660

-USA..
Good Luck..
Jeff Machols
Esteemed Contributor

Re: How can I set some kind of order in package fail

You could always put a little loop inside you control script, to see if the prereq has started, if not wait 5 seconds and check again

STATUS='init'
if [ $STATUS != 'running']
then
sleep 5
STATUS=`cmviewcl | grep packagename | awk '{print $3}'`
fi
Helen French
Honored Contributor

Re: How can I set some kind of order in package fail

hey,

ServiceGuard currently does not have configuration parameters to control
package start-up sequence. There are no parameters in the cluster ASCII
configuration file (CONF) nor the package ASCII configuration files
(conf) to handle this.


See this document in Knowledge base for a possible try: #UMCSGKBRC00008166

HTH,
Shiju
Life is a promise, fulfill it!
Jeff Machols
Esteemed Contributor
Solution

Re: How can I set some kind of order in package fail

I would also create a new function in the control script for this

if [[ $1 = "start" ]]
then
print "\n\t########### Node \"$(hostname)\": Starting package at $(date) ###########"
check_prereq

activate_volume_group

check_and_mount

then add the code from above into this function.
A. Clay Stephenson
Acclaimed Contributor

Re: How can I set some kind of order in package fail

Hi Sebastian,

I solved this problem some time ago in a rather unusual way. I created a package that simply runs a Perl script which is nothing more than a listener on a dedicated port. The listener is intentionally single threaded so that only one connection at a time is serviced. All of the other packages have a startup/shutdown scripts which wait for this server to respond. When it can respond, it returns things like pkgA up or pkgB down. The perl clients all have timeouts which prevent the scripts from hanging (they actually retry every 30 seconds until one gets a good response). I typically use it to make sure that the database package is up before the ERP application kicks off. There is a 3rd package which in turns depends upon the ERP application.


If it ain't broke, I can fix that.