Linux-HA Logo

Resource Agent

A resource agent is an encapsulation of information about a particular kind of cluster resource[1]. It knows how to do several kinds of things for its ResourceAgentType[2], and for a ResourceInstance[3] of its own type. All the types of resource agents we support resemble standard LSB[4] init scripts a great deal.

There are three types of agents supported by v2[5] of Heartbeat[6] when used with the CRM[7]. In order of encouraged usage they are:

  1. OCFResourceAgent[8]

  2. LSBResourceAgent[9]

  3. HeartbeatResourceAgent[10]

When crm yes is not present in ha.cf[11], or version 1.x is used, OCFResourceAgent[8]s are not supported.

Operations which Heartbeat[6] can perform on a ResourceInstance[3] include:

NOTE: In the OCF[12] spec, the status operation has been replaced with monitor.

Additionally, OCF agents must support:

Resource agents are typically (but not necessarily) coded as shell scripts. 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.

NOTE: Heartbeat[6] cluster resource[1]s should only be started/stopped by Heartbeat[6] itself -- e.g., shared filesystems managed by Heartbeat[6] should not be automounted by the operating system.

See Also

HeartbeatResourceAgent[10], OCFResourceAgent[8], and LSBResourceAgent[9]


References

[1]http://www.linux-ha.org/resource
[2]http://www.linux-ha.org/ResourceAgentType
[3]http://www.linux-ha.org/ResourceInstance
[4]http://www.linux-ha.org/LSB
[5]http://www.linux-ha.org/v2
[6]http://www.linux-ha.org/Heartbeat
[7]http://www.linux-ha.org/ClusterResourceManager
[8]http://www.linux-ha.org/OCFResourceAgent
[9]http://www.linux-ha.org/LSBResourceAgent
[10]http://www.linux-ha.org/HeartbeatResourceAgent
[11]http://www.linux-ha.org/ha.cf
[12]http://www.linux-ha.org/OCF


This information provided courtesy of the Linux-HA project at http://linux-ha.org/