Managing Serviceguard Eighteenth Edition, September 2010
IMPORTANT: Restrictions on service names in previous Serviceguard releases were
less stringent. Packages that specify services whose names do not conform to the above
rules will continue to run, but if you reconfigure them, you will need to change the
name; cmcheckconf and cmapplyconf will enforce the new rules.
Each service is defined by five parameters: service_name, service_cmd, service_restart,
service_fail_fast_enabled, and service_halt_timeout. See the descriptions that follow.
The following is an example of fully defined service:
service_name patricks-package4-ping
service_cmd "/usr/sbin/ping hasupt22"
service_restart unlimited
service_fail_fast_enabled no
service_halt_timeout 300
See the package configuration file for more examples.
For legacy packages, this parameter is in the package control script as well as the
package configuration file.
service_cmd
The command that runs the application or service for this service_name, for example,
/usr/bin/X11/xclock -display 15.244.58.208:0
An absolute pathname is required; neither the PATH variable nor any other environment
variable is passed to the command. The default shell is /usr/bin/sh.
NOTE: Be careful when defining service run commands. Each run command is
executed in the following way:
• The cmrunserv command executes the run command.
• Serviceguard monitors the process ID (PID) of the process the run command
creates.
• When the command exits, Serviceguard determines that a failure has occurred
and takes appropriate action, which may include transferring the package to an
adoptive node.
• If a run command is a shell script that runs some other command and then exits,
Serviceguard will consider this normal exit as a failure.
Make sure that each run command is the name of an actual service and that its process
remains alive until the actual service stops. One way to manage this is to configure a
package such that the service is actually a monitoring program that checks the health
of the application that constitutes the main function of the package, and exits if it finds
the application has failed. The application itself can be started by an external_script
(page 309).
This parameter is in the package control script for legacy packages.
300 Configuring Packages and Their Services