Operating System - HP-UX
1819872 Members
2734 Online
109607 Solutions
New Discussion юеВ

Disabling package startup

 
Matt Hearn
Regular Advisor

Disabling package startup

Hey all! I'm fiddling around with one of our serviceguard clusters, and I noticed a very troubling behavior. We run two packages, a production, and a development. We run them on separate servers, and have set things up such that when a problem occurs with whatever box the production system is on, the development package goes down, and the production system is brought up on that box.

During testing today, I shut the packages down, rebooted the boxes, and then ran cmrunnode on each server to start the cluster (I like to do this manually instead of having the system do it on bootup).

Argh! Both packages attempted to start simultaneously on one of the servers! Very very very VERY bad times. I was able to corral things before they got out of control, but I need to figure out where in the control scripts I can disable automatic package startup on node startup. I want to be able to start the cluster software on each node, and then manually start the packages on each server, and THEN use cmmodpkg -e PKG_NAME to enable ONLY THE PROD PACKAGE for failover.

Any idea where this setting might reside?

Thanks!
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Disabling package startup

In the package control script:

AUTO_RUN

1 means run
0 means not

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Matt Hearn
Regular Advisor

Re: Disabling package startup

I can't find an auto_run setting in any of my control scripts. I see it in the config script; does changing that script mean I have to recompile the cluster?
Steven E. Protter
Exalted Contributor

Re: Disabling package startup

After a change:

cmcheckconf -P packagename.ascii

or packagename.ctl naming convention is not important.

cmapplyconf -P packagename.ascii

cmruncl -v

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
melvyn burnard
Honored Contributor

Re: Disabling package startup

Well you could change the AUTO_RUN to a 0 in the package configuration file, and then do cmapplyconf -v -P package.config file.
A better way would be to use cmruncl, and not cmrunnode, this way the cluster starts up and should automatically start each package on it's primary node.
Using cmrunnode is not the correct way to start a cluster
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
karan_3
Advisor

Re: Disabling package startup

Hi Matt,
you have to change the AUTO_RUN to a 0 in the package configuration file,(/etc/cmcluster) and then do cmapplyconf -v -P package.config file.
It will not ask for a recompilation.A better way would be to use cmruncl, and not cmrunnode, this way the cluster starts up and should automatically start each package on it's primary node.but if you changed the Auto_RUN=0,then youe packages will not automatically start.then you will have to use cmrunpkg -n node name.After start the packages you can modify ur packages according ur setting.
To use cmrunnode is not the correct way to start a cluster
Karan
Stephen Doud
Honored Contributor

Re: Disabling package startup

To prevent a package from starting when the cluster is forming, insure the AUTO_RUN value is set to NO (not 0), and configured that way in the cluster binary file.
Use 'cmviewconf' to inspect the contents of the cluster binary file.
If you are not certain where the package configuration file is, you may recreate it using 'cmgetconf -p > output filename'.
Normally, the package configuration file is in the package directory on at least one of the cluster nodes, under /etc/cmcluster.
Note that to change the AUTO_RUN value from YES to NO in the cluster binary, you must halt that package before performing the 'cmapplyconf' command on the package configuration file.