Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Agent Developer's Guide   

action

The command hares with the -action option invokes the action entry point. Administrators can issue the command to bring about a specific action with respect to a specified resource on a given system within a given cluster. Actions are designated by a the action_token argument. Typically, such actions are those that can be completed in a short time and do not involve onlining or offlining the resource. The following shows the syntax for the -action option used with the hares command:


hares -action res_name action_token [-actionargs arg1 arg2 ... ] 
  [-sys sys_name] [-clus cluster]

The actions specified by the action token correspond to actions defined in the static attribute SupportedActions in the resource type definition file (see SupportedActions). Such actions may include getting the name of a database instance (in the case of a database-related agent, for example), putting a database in the restricted mode, taking a database out of restricted mode, backing up a database, and so on.

For a script-based implementation of the action entry point, a directory named actions within /opt/VRTSvcs/bin/agent must contain scripts named for each action indicated by the action token. For example, the RVG agent could have the scripts named: demote, split_dg, and promote in directory /opt/VRTSvcs/bin/RVG/actions. The agent framework invokes the script directly. (See action.)

For C++-based implementation of the action entry point, case statements correspond to actions, one for each action_token. See action.

Return Values

The action entry point exits with a 0 if it is successful, or 1 if not successful. The command hares -action exits with 0 if the action entry point exits with a 0 and 1 if the action entry point is not successful.

ActionTimeout

The default value of the static resource type attribute, ActionTimeout, is 20 seconds. This attribute can be overridden for specific resources. See ActionTimeout.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Agent Developer's Guide  
VERITAS Software Corporation
www.veritas.com