Managing HP Serviceguard A.12.00.00 for Linux, June 2014
NOTE: After the package run script has finished its work, it exits, which means that the script is
no longer executing once the package is running normally. After the script exits, the PIDs of the
services started by the script are monitored by the package manager directly. If the service dies,
the package manager will then run the package halt script or, if service_fail_fast_enabled
(page 194) is set to yes, it will halt the node on which the package is running. If a number of restarts
is specified for a service in the package control script, the service may be restarted if the restart
count allows it, without re-running the package run script.
3.4.4 Normal and Abnormal Exits from the Run Script
Exit codes on leaving the run script determine what happens to the package next. A normal exit
means the package startup was successful, but all other exits mean that the start operation did not
complete successfully.
• 0—normal exit. The package started normally, so all services are up on this node.
• 1—abnormal exit, also known as no_restart exit. The package did not complete all startup
steps normally. Services are killed, and the package is disabled from failing over to other
nodes.
• 2—alternative exit, also known as restart exit. There was an error, but the package is
allowed to start up on another node. You might use this kind of exit from a customer defined
procedure if there was an error, but starting the package on another node might succeed. A
package with a restart exit is disabled from running on the local node, but can still run on
other nodes.
• Timeout—Another type of exit occurs when the run_script_timeout is exceeded. In this
scenario, the package is killed and disabled globally. It is not disabled on the current node,
however. The package script may not have been able to clean up some of its resources such
as LVM volume groups or package mount points, so before attempting to start up the package
on any node, be sure to check whether any resources for the package need to be cleaned
up.
3.4.5 Service Startup with cmrunserv
Within the package control script, the cmrunserv command starts up the individual services. This
command is executed once for each service that is coded in the file. You can configure a number
of restarts for each service. The cmrunserv command passes this number to the package manager,
which will restart the service the appropriate number of times if the service should fail. For more
information about configuring services in modular packages, see the discussion starting with
“service_name” (page 193) in Chapter 6, and the comments in the package configuration
template file.
3.4.6 While Services are Running
During the normal operation of cluster services, the package manager continuously monitors the
following:
• Process IDs of the services
• Subnets configured for monitoring in the package configuration file
• Generic resources configured for monitoring in the package configuration file
If a service fails but the restart parameter for that service is set to a value greater than 0, the service
will restart, up to the configured number of restarts, without halting the package.
During normal operation, while all services are running, you can see the status of the services in
the “Script Parameters” section of the output of the cmviewcl command.
56 Understanding Serviceguard Software Components