Showing results for 
Search instead for 
Did you mean: 

ServiceGuard AUTO_RUN behaviour

Timo J
Frequent Advisor

ServiceGuard AUTO_RUN behaviour

2-node clusters, nodes A & B. Package running on node A, package AUTO_RUN enabled. Shutdown A, and package moves to node B. So far everything is ok. But package AUTO_RUN stays enabled after that switchover. How to prevent that? When doing manually switchover (cmhaltpkg FOO; cmrunpkg -n B FOO), AUTO_RUN changes to disabled.
Steven E. Protter
Exalted Contributor

Re: ServiceGuard AUTO_RUN behaviour

The normal reason for a package to failover is because it can't run on the primary node.

Properly configured your package should stop running on node A when conditions on node A force a failover to node B.

I'd check the log files in /etc/cmcluster and see if hey help.

Steven E Protter
Owner of ISN Corporation
Timo J
Frequent Advisor

Re: ServiceGuard AUTO_RUN behaviour

Package switches ok to node B, but why the AUTO_RUN stays enabled after that? If node A is down, why still keep that parameter enabled and thus meaning that package could switch over back to node A even if it's down? OK, in practice that doesn't matter because package can't start on node A anyhow until node A is really up & running.
Serviceguard for Linux
Honored Contributor

Re: ServiceGuard AUTO_RUN behaviour

AUTO_RUN really means -
1. if the node a package is currently running on fails and
2. there is a node up that the package is configured to run on then
3. allow it to failover and run on a node.

Another way to look at it is - "really try to keep this package running if the node it is running on fails".

In your case if NODE A comes back the package will stay. But if NODE B then fails the package is allowed to move to NODE A.

AUTO_RUN changes to disabled after a manual switchover because there is an assumption that you are doing maintanence and, even though a node may be up, you don't want it to move automatically.

The FAILBACK POLICY determines what happens to the package after the first node comes back.
Stephen Doud
Honored Contributor

Re: ServiceGuard AUTO_RUN behaviour

AUTO_RUN is like a main circuit breaker, and node_switching is like minor breakers.
When AUTO_RUN is ENABLED, you give permission to SG to run the package on any node available to run it, beginning with the primary node, and working down the list of adoptive nodes, as the package fails over.
Should Node_switching be disabled for a particular node, Serviceguard will skip that node as a failover node.
As stated before, when a package is manually halted, Serviceguard views this as a maintenance situation and disables AUTO_RUN.

Use cmviewcl -v -p to see both the AUTO_RUN and Node_switching status.

cmmodpkg is used to set both AUTO_RUN and Node_switching.
The first syntax for cmmodpkg is:
cmmodpkg {-e|-d} [-n node_name]... [-v] package_name...

When used WITHOUT the -n option, AUTO_RUN will be affected, whereas when used WITH the -n option, Node_Switching will be affected.
melvyn burnard
Honored Contributor

Re: ServiceGuard AUTO_RUN behaviour

You have to lok at BOTH the Local Switching and the Global Switching parameters to verify package failover behaviour.
Global switching just defines whether the package is allowed to switch across nodes WITHIN the cluster.
Local switching defines whether a node is ALLOWED to run the package or not.

May I suggest you take a read of the following manual:

Take a look at pages 46/47, and 211/219
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!