1755122 Members
3517 Online
108830 Solutions
New Discussion юеВ

Re: auto start package

 
SOLVED
Go to solution
yash123
Regular Advisor

auto start package

Hello,
I halted package and restarted the server for application maintanence. After starting the server package didint start automatically. I started manually. AUTO_RUN is set as YES.
Is it normal behaviour?


7 REPLIES 7
Matti_Kurkela
Honored Contributor
Solution

Re: auto start package

The AUTO_RUN setting in the package configuration is the _initial state_ for that package. It is used when the entire cluster is starting up, and not at any other time.

The AUTO_RUN setting displayed by the cmviewcl command is the _current state_ of AUTO_RUN for that package. After the cluster has started up, it is independent of the AUTO_RUN setting in the configuration file.

If the _current state_ of AUTO_RUN is NO, the package won't failover at all. In short, the AUTO_RUN attribute is the switch that "arms" or "disarms" the failover logic for the package.

When the cluster is already running, it keeps track of the AUTO_RUN states of each package separately. When you halt a package using cmhaltpkg, the cmhaltpkg command will automatically disable AUTO_RUN for that package. If it didn't do that, then Serviceguard would think the package must be restarted immediately, and would either restart the package on the same node, or fail it over to a different node, depending on other settings in the package configuration.

All the currently-supported versions of Serviceguard will remind you that AUTO_RUN will be automatically switched off when you use the cmhaltpkg command.

When you restarted the server, the server left the cluster for the duration of the reboot. Once it joined back to the cluster, the other node(s) informed it about the current state of the package(s). The last order you gave regarding the package was to halt it: the cluster still "remembers" that order, so the rejoining node is told that the package should stay in the halted state until the sysadmin gives other commands or the entire cluster is restarted.

So yes, this is normal behaviour.

When you start a package with cmrunpkg, the package will start, but its AUTO_RUN attribute will still remain in NO state: once you're satisfied the package has started up correctly, you should re-arm the failover logic by using "cmmodpkg -e ", or the package won't failover automatically.

MK
MK
yash123
Regular Advisor

Re: auto start package

Thanks a lot for the clear explanation.

yash123
Regular Advisor

Re: auto start package

do I need to specify node name while enable package switching or the below command is enough.
this is a 2 node cluster and package is running on primary node

cmmodepkg -e pkgname
melvyn burnard
Honored Contributor

Re: auto start package

you need to check both LOCAL and GLOBAL enablement, so use cmviewcl -v to make sure it is enabled
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
yash123
Regular Advisor

Re: auto start package

Hi Melvin,
please find the cmviewcl -v output


PACKAGE STATUS STATE AUTO_RUN NODE
ebspk up running disabled ebsprd2
Policy_Parameters:
POLICY_NAME CONFIGURED_VALUE
Failover configured_node
Failback manual
Node_Switching_Parameters:
NODE_TYPE STATUS SWITCHING NAME
Primary up enabled ebsprd2 (current)
Alternate up disabled ebsprd3

NODE STATUS STATE
ebsprd3 up running
John Bigg
Esteemed Contributor

Re: auto start package

You will see here that auto run is disabled on node ebsprd2. This means it will not automatically start there if there is a failure.

You should run cmmodpkg -e -n ebsprd2 to enable it an allow it to auto run on that node.
John Bigg
Esteemed Contributor

Re: auto start package

Sorry, the messed up tabular format confused me. I made a mistake in the last post. Auto run/switching is enabled on ebsprd2 but not globally or on ebsprd3. Therefore you need to enable it globally and for node ebsprd3:

cmmodpkg -e ebspk
cmmodpkg -e -n ebsprd3 ebspk

This will ensure that it can run on ebsprd3 in the event of a failure on ebsprd2.

Hope I did not confuse you further.