Serviceguard
cancel
Showing results for 
Search instead for 
Did you mean: 

How to start up cluster with some of packages?

 
zhaogui
Super Advisor

How to start up cluster with some of packages?

We have 3-node cluster running 8 packages. Because there is package dependancy problem, some packages have to be up first before other package can start. Anybody know if there is any way to start up cluster with 4 packages only?

Thanks in advance,
6 REPLIES 6
Rajeev Shukla
Honored Contributor

Re: How to start up cluster with some of packages?

Its not possible to alter the or prioritise the packages. All the packages start at the same time. However if you want some packages to start first, they should be small enough so that they come first before others can. Like having small resourses or small application.

Regards
Armin Feller
Honored Contributor

Re: How to start up cluster with some of packages?

ServiceGuard was designed to work with independent packages. ServiceGuard
does not support interdependent packages. The dependent package concept
usually requires one package to start before another. It also requires the
subordinate packages to test for the operation of the primary package, and to
halt if the primary package should halt. ServiceGuard does not have
configuration parameters to control package start-up sequence, nor tests for
package dependencies. There are no parameters in the cluster ASCII
configuration file nor the package ASCII configuration files to handle this.


HP Education teaches how to make a package dependent upon another package
in the MC/ServiceGuard II course, H4310S. To accomplish this task, use
Event Monitoring Service (EMS) and have the "dependent" package
monitor the status of "required" package status using the EMS variable,
/cluster/package/package_status/[package name].
Jean-Louis Phelix
Honored Contributor

Re: How to start up cluster with some of packages?

hi,

The only way I know to do it simply, is to use AUTO_RUN to NO for packages which needs other packages and launch them from customer_defined_run_cmds function.

if P2 needs P1 :

A - P1 AUTO_RUN YES
B - P2 AUTO_RUN NO
C - P1 customer_defined_run_cmds function :
. launch P1 programs
. cmrunpkg P2
D - P1 customer_defined_halt_cmds function :
. cmhaltpkg P2
. stop P1 programs

Regards
It works for me (© Bill McNAMARA ...)
melvyn burnard
Honored Contributor

Re: How to start up cluster with some of packages?

The one way to do this is to use RSOURCE dependencies in hte packages, for example in hte ServiceGuard II course, you are shown how to make a web server package be dependant upon an oracle dbase package being up and running before the web server package starts.
Take a look at the Managing MC/Serviceguard manaual at:
http://docs.hp.com/hpux/ha

Failing htat, you have to write your own checks into the customer_define_run_cmds section
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
zhaogui
Super Advisor

Re: How to start up cluster with some of packages?

How can I set AUTORUN to yes or no when cluster is not up(cmcld is not running)? Do you mean I need to change AUTO_RUN in P2.conf to "NO" before I run "cmruncl"? I believe cmmodpkg -d P2 doesn't work when cmcld is not running.

Currently I manually start up cluster after rebooting all 3 nodes by running "cmruncl", which will randomly start up all packages. I noticed that cmruncl only has "-n node" option but don't have "-p package". I know cmruncl has no idea about which package should start first, but is it good idea to have dependancy check(see below) for P1's availability in P2's control script? Will that prolong the package's failover time?

#P2's customer_defined_run_cmds function

...
While P1 is not up
do
sleep 10
done
to_start_P2
...
Highlighted
Stephen Doud
Honored Contributor

Re: How to start up cluster with some of packages?

AUTO_RUN is a package parameter in the package configuration file which governs whether the package starts automatically when the cluster is formed. Setting AUTO_RUN to NO causes the package to remain down when the cluster is started.
With the package down, perform a cmapplyconf on the package configuration file to update the cluster binary with this setting.

As stated before, standard ServiceGuard does not have a dependent-package feature set. Armin, Melvyn and Jean-Louis has given good advice for implementation. As you found, the customer_defined_run_cmds section can be exploited to start up a dependent package. Such a technique is not supported by HP, so insure error checking and package dependency checking is well handled.

I also wrote a document available through the ITRC Knowledge Database which may help.
ID Num: UMCSGKBRC00008166
TITLE: Dependent packages, can the order of package startup be controlled?

Good Luck!
-s.