Managing Serviceguard A.11.20, March 2013
You can add custom code to the package to interrogate this variable, determine why the package
halted, and take appropriate action. For legacy packages, put the code in the
customer_defined_halt_cmds() function in the CUSTOMER DEFINED FUNCTIONS area
of the package control script; see “Adding Customer Defined Functions to the Package Control
Script ” (page 312). For modular packages, put the code in the package’s external script; see “About
External Scripts” (page 157).
For example, if a database package is being halted by an administrator (SG_HALT_REASON set
to user_halt) you would probably want the custom code to perform an orderly shutdown of the
database; on the other hand, a forced shutdown might be needed if SG_HALT_REASON is set to
failure, indicating thatthe package is halting abnormally (for example because of the
failure of a service it depends on).
last_halt_failed
cmviewcl -v -f line displays a last_halt_failed flag.
NOTE: last_halt_failed appears only in the line output of cmviewcl, not the default
tabular format; you must use the -v and -f line options to see it.
The value of last_halt_failed is no if the halt script ran successfully, or was not run since the
node joined the cluster, or was not run since the package was configured to run on the node;
otherwise it is yes.
About Cross-Subnet Failover
It is possible to configure a cluster that spans subnets joined by a router, with some nodes using
one subnet and some another. This is known as a cross-subnet configuration; see “Cross-Subnet
Configurations” (page 29). In this context, you can configure packages to fail over from a node
on one subnet to a node on another.
The implications for configuring a package for cross-subnet failover are as follows:
• For modular packages, you must configure two new parameters in the package configuration
file to allow packages to fail over across subnets:
◦ ip_subnet_node (page 247) - to indicate which nodes a subnet is configured on
◦ monitored_subnet_access (page 245) - to indicate whether a monitored subnet is
configured on all nodes (FULL) or only some (PARTIAL). (Leaving
monitored_subnet_access unconfigured for a monitored subnet is equivalent to
FULL.)
(For legacy packages, see “Configuring Cross-Subnet Failover” (page 314).)
• You should not use the wildcard (*) for node_name (page 239) in the package configuration
file, as this could allow the package to fail over across subnets when a node on the same
subnet is eligible. Failing over across subnets can take longer than failing over on the same
subnet. List the nodes in order of preference instead of using the wildcard.
• Each subnet interface (NIC) used by the package must have a standby interface on the local
bridged net.
The standby interface can be shared between subnets.
160 Planning and Documenting an HA Cluster