Managing HP Serviceguard A.11.20.20 for Linux, March 2014

3.4.1 What Makes a Package Run?
There are 3 types of packages:
The failover package is the most common type of package. It runs on one node at a time. If
a failure occurs, it can switch to another node listed in its configuration file. If switching is
enabled for several nodes, the package manager will use the failover policy to determine
where to start the package.
A system multi-node package runs on all the active cluster nodes at the same time. It can be
started or halted on all nodes, but not on individual nodes.
A multi-node package can run on several nodes at the same time. If auto_run is set to yes,
Serviceguard starts the multi-node package on all the nodes listed in its configuration file. It
can be started or halted on all nodes, or on individual nodes, either by user command
(cmhaltpkg) or automatically by Serviceguard in response to a failure of a package
component, such as service or subnet.
System multi-node packages are supported only for use by applications supplied by Hewlett-Packard.
A failover package can be configured to have a dependency on a multi-node or system multi-node
package. The package manager cannot start a package on a node unless the package it depends
on is already up and running on that node.
The package manager will always try to keep a failover package running unless there is something
preventing it from running on any node. The most common reasons for a failover package not
being able to run are that auto_run is disabled so Serviceguard is not allowed to start the
package, that node switching is disabled for the package on particular nodes, or that the package
has a dependency that is not being met. When a package has failed on one node and is enabled
to switch to another node, it will start up automatically in a new location where its dependencies
are met. This process is known as package switching, or remote switching.
A failover package starts on the first available node in its configuration file; by default, it fails over
to the next available one in the list. Note that you do not necessarily have to use a cmrunpkg
command to restart a failed failover package; in many cases, the best way is to enable package
and/or node switching with the cmmodpkg command.
When you create the package, you indicate the list of nodes on which it is allowed to run. System
multi-node packages must list all cluster nodes in their cluster. Multi-node packages and failover
packages can name some subset of the cluster’s nodes or all of them.
If the auto_run parameter is set to yes in a package’s configuration file Serviceguard
automatically starts the package when the cluster starts. System multi-node packages are required
to have auto_run set to yes. If a failover package has auto_run set to no, Serviceguard cannot
start it automatically at cluster startup time; you must explicitly enable this kind of package using
the cmmodpkg command.
NOTE: If you configure the package while the cluster is running, the package does not start up
immediately after the cmapplyconf command completes. To start the package without halting
and restarting the cluster, issue the cmrunpkg or cmmodpkg command.
How does a failover package start up, and what is its behavior while it is running? Some of the
many phases of package life are shown in Figure 19.
NOTE: This diagram applies specifically to legacy packages. Differences for modular scripts are
called out below.
3.4 How Packages Run 55