Cluster Resources

Contents

14.1. Supported Resource Agent Classes
14.2. OCF Return Codes
14.3. Resource Options
14.4. Resource Operations
14.5. Instance Attributes

This chapter summarizes the most important facts and figures related to cluster resources: the resource agent classes the High Availability Extension supports, the error codes for OCF resource agents and how the cluster reacts to the error codes, the available resource options, resource operations and instance attributes. Use this overview as a reference when configuring resources (either manually with the crm line tool or with the Linux HA Management Client).

Supported Resource Agent Classes

For each cluster resource you add, you need to define the standard that the resource agent confirms to. Resource agents abstract the services they provides and present an accurate status to the cluster, which allows the cluster to be agnostic about the resources it manages. The cluster relies on the resource agent to do the right thing when given a start, stop or monitor command.

Typically resource agents come in the form of shell scripts. The High Availability Extension supports the following classes of resource agents:

Legacy Heartbeat 1 Resource Agents

Heartbeat version 1 came with its own style of resource agents. As many people have written their own agents based on its conventions, these resource agents are still supported. However, it is recommended to migrate your configurations to High Availability OCF RAs if possible. For more information, see http://wiki.linux-ha.org/HeartbeatResourceAgent.

Linux Standards Base (LSB) Scripts

LSB resource agents are generally provided by the operating system/distribution and are found in /etc/init.d. To be used with the cluster, they must conform to the LSB specification. For example, they must have several actions implemented, which are at least start, stop, restart, reload, force-reload, and status as explained in http://www.linuxbase.org/spec/refspecs/LSB_3.0.0/LSB-Core- generic/LSB-Core-generic/iniscrptact.html.

Open Cluster Framework (OCF) Resource Agents

OCF RA agents are suited best for use with High Availability, especially when you need master resources or special monitoring abilities. The agents are generally located in /usr/lib/ocf/resource.d/heartbeat/. Their functionality is similar to that of LSB scripts. However, the configuration is always done with environment variables which allows them to accept and process parameters easily. The OCF specification (as it relates to resource agents) can be found at http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.txt?rev=HEAD 4. OCF specifications have strict definitions of which exit codes must be return by actions. The cluster follows these specifications exactly. For more information, see http://wiki.linux-ha.org/OCFResourceAgent. For a detailed list of all available OCF RAs, refer to Chapter 15, HA OCF Agents.

STONITH Resource Agents

This class is used exclusively for fencing related resources. For more information, see Chapter 8, Fencing and STONITH.

The agents supplied with the High Availability Extension are written to OCF specifications.