Installation guide

76 Chapter 4:Service Configuration and Administration
Service
Property
or
Resource
Description
Service
Check
Interval
Specifies the frequency (in seconds) that the system will check the health of
the application associated with the service. For example, it will verify that the
necessary NFS or Samba daemons are running. For additional service types, the
monitoring consists of examining the return status when calling the "status" clause
of the application service script. Specifying a value of 0 for the service check
interval will disable checking.
Disable
service
policy
If a user does not want to automatically start a service after it is added to the cluster,
it is possible to keep the new service disabled until the user enables it.
4.1.2 Creating Service Scripts
The cluster infrastructure starts and stops service to specified applications by running service specific
scripts. For both NFS and Samba services, the associated scripts are built into the cluster services
infrastructure. Consequently, when running cluadmin to configure NFS and Samba services, do not
enter a service script name. For other application types it is necessary to designate a service script. For
example, when configuring a database application in cluadmin, specify the fully qualified pathname
of the corresponding database start script.
The format of the service scripts conforms to the conventions followed by the System V init scripts.
This convention dictates that the scripts have a start, stop, and status clause. These should
return an exit status of 0 on success. The cluster infrastructure will stop a cluster service that fails to
successfully start. Inability of a service to start will result in the service being placed in a disabled
state.
In addition to performing the stop and start functions, service scripts are also used for application
service monitoring purposes. This is performed by calling the status clause of a service script. To
enable service monitoring, specify a nonzero value for the Status check interval: prompt in
cluadmin. If a nonzero exit is returned by a status check request to the service script, then the cluster
infrastructure will first attempt to restart the application on the member it was previously running
on. Status functions do not have to be fully implemented in service scripts. If no real monitoring is
performed by the script, then a stub status clause should be present which returns success.
The operations performed within the status clause of an application can be tailored to best meet the
application’s needs as well as site-specific parameters. For example, a simple status check for a data-
base would consist of verifying that the database process is still running. A more comprehensive check
would consist of a database table query.