Index Index for
Section 4
Index Alphabetical
listing for C
Index Bottom of
page

caa(4)

NAME

caa - Cluster Application Availability (CAA) information

SYNOPSIS

Application resource profile: TYPE=application NAME=resource_name [DESCRIPTION=description] [CHECK_INTERVAL=check_interval] [FAILURE_THRESHOLD=failure_threshold FAILURE_INTERVAL=failure_interval] [REQUIRED_RESOURCES=resource_list] [OPTIONAL_RESOURCES=resource_list] [PLACEMENT=placement_policy] [HOSTING_MEMBERS=member_list] [RESTART_ATTEMPTS=restart_attempts] [FAILOVER_DELAY=failover_delay] [AUTO_START={0|1}] [ACTION_SCRIPT=action_script] [SCRIPT_TIMEOUT=script_timeout] [ACTIVE_PLACEMENT={0|1}] Network resource profile: TYPE=network NAME=resource_name [DESCRIPTION=description] [FAILURE_THRESHOLD=failure_threshold FAILURE_INTERVAL=failure_interval] SUBNET=subnet_addr

OPERANDS

TYPE={application|network} Resource type. Specify either application or network. NAME=resource_name Resource name. Specify a resource_name as a string containing a combination of letters a-z, or A-Z, or digits 0-9. [DESCRIPTION=description] Resource description string. [CHECK_INTERVAL=check_interval] Time (in seconds) at which the check entry point of the application's action script runs. The check interval is the maximum amount of time an application can be unavailable to clients before CAA attempts to restart it. If you do not supply a check interval, it defaults to 60 seconds. [FAILURE_THRESHOLD=failure_threshold] (reserved for future use) [FAILURE_INTERVAL=failure_interval] (reserved for future use) [REQUIRED_RESOURCES=resource_list] Ordered list of resources, separated by white space, on which the application depends. These resources must be active on any member on which the application is running, or must be application resources that may be started on the cluster member. If you don't specify a required resources list, CAA imposes no required dependencies upon the application resource. CAA uses the required resources list, in conjunction with the failover policy and hosting members list, to determine which members are eligible to host the application resource. It also uses the required resources list to start required application resources when the caa_start command is run. A failure of a required resource on the hosting member, will cause CAA to initiate failover of the application. This could cause CAA to fail the application resource over to another member that provides the resource or to stop the application. In the latter case, CAA continues to monitor the required resources and restarts the application when the resource is again available in the cluster. [OPTIONAL_RESOURCES=resource_list] (reserved for future use) [PLACEMENT=placement_policy] Policy according to which CAA selects the member on which to start or restart the application resource. CAA uses the placement policy in conjunction with the resource's required list. You can specify any one of the following as a placement policy: balanced The balanced application resources are distributed equally among all active members if no optional resources are listed. favored CAA refers to the hosting members list before starting or restarting the application resource. First, the member on the hosting members list is chosen based on optional resources, see OPTIONAL RESOURCES for more information. If a member cannot be chosen based on optional resources, the first member on the list is most favored to run the service. If that member is unavailable, the second member on the list is the most favored, and so on. If all members on the hosting members list are unavailable, CAA favors placing the application resource on the member currently running the fewest application resources. You must specify a hosting members list when you select a favored placement policy. restricted Similar to the favored placement policy, except that if all members on the hosting members list are unavailable, CAA will not start or restart the application resource. A restricted placement policy ensures that the resource will never run on a member that is not on the list, unless you manually relocate it to that member. You must specify a hosting members list when you select a restricted placement policy. If you do not specify a placement policy, CAA uses a balanced placement policy for the application resource by default. [HOSTING_MEMBERS=member_list] Hosting members list. Specify an ordered list of members, separated by white space, that can host the application resource. If you specify a placement policy of favored or restricted, you must also specify a hosting members list. CAA uses the hosting members list in conjunction with the application resource's placement policy. After optional resources are considered, Applications are placed on hosts in the order in which they are listed in the hosting members list. [RESTART_ATTEMPTS=restart_attempts] (reserved for future use) [FAILOVER_DELAY=failover_delay] (reserved for future use) [AUTO_START={0|1}] (reserved for future use) [ACTION_SCRIPT=action_script] User-written action script for the application resource. The format of CAA action scripts is similar to that of system init files located in the /sbin/init.d directory. The script file performs user-defined tasks and can invoke other scripts and executable programs. An action script has the following entry points: start Called by CAA to start or restart the application resource. The start entry point executes all commands necessary to start the application and must return 0 (zero) for success and a nonzero value for failure. stop Called by CAA to stop a running application resource. It is not called when stopping a suspended application resource (see caa_stop(8) for details). The stop entry point executes all commands necessary to stop the application and must return 0 (zero) for success and a nonzero value for failure. check (reserved for future use) You can specify either a full pathname for the script file, or its filename (in which case CAA looks for the file in the /var/cluster/caa/script directory). If you do not specify an action script, CAA looks for an action script named /var/cluster/caa/script/resource_name.scr. SUBNET=subnet_addr Subnet address of a network resource. Specify the subnet address in xxx.xxx.xxx.0 format (for example, 16.140.112.0).

DESCRIPTION

CAA tracks the state of the members in a cluster and resources in a cluster (such as networks and applications). CAA monitors the needs of application resources in a cluster and ensures that applications run on members that meet their needs. If the cluster member on which an application is running fails, or if a particular resource that another resource requires fails, CAA relocates the application to another member that has the required resources available. CAA allows you to enhance overall application performance by balancing application execution among a set of available cluster members. CAA manages both application and network resources. You must have root privileges to use most CAA commands. Only, the caa_stat command does not require root priviliges. CAA consists of components that work together to make application resources highly available: · A resource manager comprised of the run-time CAA daemons (caad) on all cluster members. The resource manager starts, stops, relocates, and restarts application resources when failure conditions occur. · A user interface that allows you to manage application and network resources in a cluster. The commands available with the command-line interface are listed in the SEE ALSO section of this reference page. The SysMan menu provides a graphical user interface (GUI) for performing system management tasks for the cluster, cluster members, and CAA applications. For more information on using SysMan, see sysman(8) and the online help available for the sysman application. · Resources that are managed and monitored by CAA which may have dependencies on each other. A resource is defined by its resource profile. · Action scripts associated with resources that are used by CAA to start and stop the application resources. A resource profile is an ASCII text file that assigns values to attributes that define how a resource should be managed or monitored in a cluster. The attributes described in the SYNOPSIS and OPERANDS section of this reference page make up a profile. Create a resource profile by using the caa_profile(8) command, the Profile Management item under the SysMan Menu, or a text editor. The type of resource (application or network determines which keywords and operands you can specify in its profile. Profiles are written to the /var/cluster/caa/profile directory by caa_profile. CAA expects all resource profiles to be in the /var/cluster/caa/profile directory. When you create a resource profile with a text editor, you can omit optional keywords and operands (for example, REQUIRED_RESOURCES and RESTART ATTEMPTS). There are default values for most keywords. You can also update a resource profile with a text editor. Any time you edit a profile by hand, you should validate the profile with the caa_profile -validate command. Using the caa_register -u command, you can then update the resource while the resource remains online. Only certain keyword settings can be updated: You cannot update the NAME or TYPE of any resource. You cannot update the SUBNET address of a network resource. You can update: ACTION_SCRIPT Changes to the action script location and contents take effect the next time CAA uses the script. DESCRIPTION Changes to the description take place immediately. HOSTING_MEMBERS Changes to the hosting members list take place the next time the placement policy is executed. REQUIRED_RESOURCES Changes to the required resource list take place the next time the placement policy is executed. OPTIONAL_RESOURCES Changes to the optional resource list take place the next time the placement policy is executed. PLACEMENT Changes to the placement policy take place the next time the placement policy is executed. AUTO_START Changes to auto-start take effect after the next cluster reboot. CHECK_INTERVAL Changes to the check interval take effect immediately and reset the check interval timer. FAILURE_THRESHOLD Changes to the failure threshold take effect immediately. FAILURE_INTERVAL Changes to the failure interval take effect immediately. RESTART_ATTEMPTS Changes to the restart attempts take place the next time the placement policy is executed. FAILOVER_DELAY Changes to the failover delay take effect immediately. CAA does extensive logging of its actions to both the command line and the EVM event management system. To monitor CAA related EVM events, see the examples below. See the EVM(5) reference page for details on how to use the EVM event management system. If a CAA daemon is busy and cannot process the caa_start/caa_stop request immediately, a message that the daemon is busy is displayed and the request is queued for processing once the daemon is free.

EXAMPLES

The following is an example of an application resource profile: TYPE = application NAME = xclock CHECK_INTERVAL = 60 FAILURE_THRESHOLD = 0 FAILURE_INTERVAL = 0 REQUIRED_RESOURCES = OPTIONAL_RESOURCES = HOSTING_MEMBERS = PLACEMENT = balanced RESTART_ATTEMPTS = 1 FAILOVER_DELAY = 0 AUTO_START = 0 ACTION_SCRIPT = xclock.scr SCRIPT_TIMEOUT = 90 ACTIVE_PLACEMENT = 0 The following is an example of an network resource profile: TYPE = network NAME = net1 CHECK_INTERVAL = FAILURE_THRESHOLD = 0 FAILURE_INTERVAL = 0 SUBNET = 16.140.112.0 The following is an example action script: #!/usr/bin/ksh -p # PATH=/sbin:/usr/sbin:/usr/bin export PATH CAATMPDIR=/var/cluster/caa/tmp CMDPATH=/usr/bin/X11/xclock CMD=`basename $CMDPATH` case $1 in 'start') if [ -f $CMDPATH ]; then $CMDPATH & exit 0 else exit 1 fi ;; 'stop') ps -e -o pid,command | while read pid command args do case "${command}" in ${CMDPATH}|${CMD}) kill -TERM $pid exit 0 ;; esac done exit 1 ;; 'check') PIDLIST=`ps ax | egrep $CMDPATH | egrep -v 'grep' | awk '{print $1}'` if [ -z "$PIDLIST" ]; then PIDLIST=`ps ax | egrep $CMD | egrep -v 'grep' | awk '{pr int $1}'` fi if [-n "$PIDLIST" ]; then exit 0 else exit 1 fi ;; esac To monitor CAA events on the console, use the following command: # evmwatch | evmshow -f "[name *.caa.*]" To view events related to CAA that have been sent to the EVM Event Management System: # evmget | evmshow -f "[name *.caa.*]"

SEE ALSO

Commands: caa_profile(8), caa_register(8), caa_relocate(8), caa_start(8), caa_stat(1), caa_stop(8), caa_unregister(8) Daemon: caad(8) TruCluster Server Cluster Administration

Index Index for
Section 4
Index Alphabetical
listing for C
Index Top of
page