Resource Agents
From Linux-HA
A resource agent is a standardized interface for a cluster resource. In translates a standard set of operations into steps specific to the resource or application, and interprets their results as success or failure.
Resource Agents have been managed as a separate Linux-HA sub-project since their 1.0 release, which coincided with the Heartbeat 2.99 release. Previously, they were a part of the then-monolithic Heartbeat project, and had no collective name.
Supported Operations
Operations which a resource agent my perform on a resource instance include:
- start: enable or start the given resource
- stop: disable or stop the given resource
- status: return the status of the given resource (running or not running)
- monitor: like status, but also check specifically for unexpected not running states
- validate: validate the resource's configuration
- meta-data: return information about the resource agent itself (used by GUIs and other management utilities, and documentation tools)
Implementation
Most resource agents are coded as shell scripts. This, however, is by no means a necessity – the defined interface is language agnostic.
They are synchronous in nature. That is, you start them, and they complete some time later, and you are expected to wait for them to complete. Certain operations (notably start, stop and monitor) may take considerable time to complete. Considerable time means seconds to many minutes in some cases.
Source Code Repository
Source code for Cluster Glue is being maintained in the http://hg.linux-ha.org/agents Mercurial Repository.
