HP-UX HB v13.00 Ch-15 - Serviceguard
HP-UX Handbook – Rev 13.00 Page 65 (of 108)
Chapter 15 Serviceguard
October 29, 2013
package control script.
customer_defined_run_cmds This is the place where the customer’s HA application is
started. Failures analysis in this area should be started from the application side.
Commenting out the faulty command may be a good strategy to get a minimum trouble-
shooting environment running (otherwise the complete package start fails, causing all file
systems to be umounted, etc). In modular packages, this section is handled by the
external.sh operation.
start_services The Serviceguard command cmrunserv is used to start the package’s
services. These are typically shell scripts monitoring the health of the HA application. An
exiting service script means Monitoring Failed, causing the corresponding package to
failover to an adoptive node. The cmrunserv and cmhaltserv commands must not be used
manually from the command line.
start_resources The Serviceguard command cmstartres is used to start monitoring of
deferred EMS resources.
What happens during package stop
Stopping of a package performs in general the reverse order of steps as described above. If a
package halt fails, cleanup may be needed to get the system back to a defined “package halted
state” manually. This includes:
Package services are stopped.
The application is halted.
All relocatable IP adresses are de-configured. If not done automatically, this can be done
manually using e.g. cmmodnet –r –i 192.10.10.120 192.10.10. or ifconfig
lan0:2 0.0.0.0
All package filesystems are umounted. All processes keeping them busy need to be terminated
first (the ‘lsof’ command may be useful to identify processes not killed by fuser). If the
filesystem was exported via NFS it may be required to kill/restart the rpc.statd and
rpc.lockd processes also.
Deactivate all VGs of the package (vgchange –a n VG). This is only possible if all filesystems
were successfully umounted before. Otherwise this fails with a Device busy error.
Package Control Script Hangs or Failures
When a RUN_SCRIPT_TIMEOUT or HALT_SCRIPT_TIMEOUT value is set, and the control script
hangs, causing the timeout to be exceeded, Serviceguard kills the script and marks the package
“Halted.” Similarly, when a package control script fails, Serviceguard kills the script and marks
the package “Halted.” In both cases, the following also take place:
Control of a failover package will not be transferred.
The run or halt instructions may not run to completion.