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

How Agents Work

A single VCS agent can manage multiple resources of the same type on one host. For example, the NIC agent manages all NIC resources.

When the VCS engine process, had, comes up on a system, it automatically starts the agents required for the types of resources that are to be managed and provides the agents the specific configuration information for those resources. The agent carries out the commands from VCS to bring resources online and take them offline. The agents also periodically monitor the resources, updating VCS with their status. When an agent crashes or hangs, VCS detects the fact and restarts the agent.


Note   Note    The VCS engine process is known as "had." The acronym stands for "high-availability daemon."

The Agent Framework

The VCS agent framework is a set of predefined functions compiled into the agent for each resource type. These functions include the ability to connect to the VCS engine and to understand the common VCS configuration attributes, such as RestartLimit and MonitorInterval. When an agent's code is built in C++, the agent framework is compiled in with an include statement. When an agent is built using script languages, such as shell or Perl, the ScriptAgent provides the agent framework functions. The agent framework handles much of the complexity that should not concern the agent developer.

Resource Type Definitions

Each resource type requires a resource type definition. A resource type definition describes the information an agent needs to control resources of that type. The type definition can be considered similar to a header file in a C program. The type definition defines the data types of variables (attributes) to provide error checking and provides the order that the variables (attributes) are passed to the entry points.

Entry Points

An entry point is a section of code or a script used by the agent to carry out a specific function on a resource. The agent framework supports a specific set of entry points, each of which has a basic structure and a set of return values. Descriptions of each of the supported entry points begin with Agent Entry Points.

The agent developer implements entry points for a resource by providing the specific definitions required to manage the resource. For example, when implementing an agent's online entry point, the developer includes the command to start a resource; when implementing the monitor entry point, the developer includes the commands to check if the resource is online or not.

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