Managing Serviceguard Eighteenth Edition, September 2010

NOTE: If a package is dependent on a subnet, and the subnet fails on the node where
the package is running, the package will start to shut down. If the subnet recovers
immediately (before the package is restarted on an adoptive node), the package manager
restarts the package on the same node; no package switch occurs.
When a Package is Halted with a Command
The Serviceguard cmhaltpkg command has the effect of executing the package halt
script, which halts the services that are running for a specific package. This provides
a graceful shutdown of the package that is followed by disabling automatic package
startup (see auto_run on (page 289)).
You cannot halt a multi-node or system multi-node package unless all packages that
have a configured dependency on it are down. Use cmviewcl to check the status of
dependents. For example, if pkg1 and pkg2 depend on PKGa, both pkg1 and pkg2
must be halted before you can halt PKGa.
NOTE: If you use cmhaltpkg command with the-n <nodename> option, the package
is halted only if it is running on that node.
Thecmmodpkg command cannot be used to halt a package, but it can disable switching
either on particular nodes or on all nodes. A package can continue running when its
switching has been disabled, but it will not be able to start on other nodes if it stops
running on its current node.
During Halt Script Execution
Once the package manager has detected the failure of a service or package that a failover
package depends on, or when the cmhaltpkg command has been issued for a particular
package, the package manager launches the halt script. That is, a package’s control
script or master control script is executed with the stop parameter. This script carries
out the following steps (also shown in Figure 3-15):
1. Halts any deferred resources that had been started earlier.
2. Halts all package services.
3. Executes any customer-defined halt commands (legacy packages only) or
external_scripts (modular packages only(page 309)).
4. Removes package IP addresses from the LAN card on the node.
5. Unmounts file systems.
6. Deactivates volume groups.
7. Exits with an exit code of zero (0).
8. Executes any external_pre_scripts (modular packages only (page 309)).
86 Understanding Serviceguard Software Components