Product SiteDocumentation Site

5.2. Supported Resource Classes

There are five classes of agents supported by Pacemaker:
Version 1 of Heartbeat came with its own style of resource agents and it is highly likely that many people have written their own agents based on its conventions. [7]
Although deprecated with the release of Heartbeat v2, they were supported by Pacemaker up until the release of 1.1.8 to enable administrators to continue to use these agents.

5.2.1. Open Cluster Framework

The OCF standard [8] [9] is basically an extension of the Linux Standard Base conventions for init scripts to:
  • support parameters,
  • make them self describing and
  • extensible
OCF specs have strict definitions of the exit codes that actions must return. [10]
The cluster follows these specifications exactly, and giving the wrong exit code will cause the cluster to behave in ways you will likely find puzzling and annoying. In particular, the cluster needs to distinguish a completely stopped resource from one which is in some erroneous and indeterminate state.
Parameters are passed to the script as environment variables, with the special prefix OCF_RESKEY_. So, a parameter which the user thinks of as ip it will be passed to the script as OCF_RESKEY_ip. The number and purpose of the parameters is completely arbitrary, however your script should advertise any that it supports using the meta-data command.
The OCF class is the most preferred one as it is an industry standard, highly flexible (allowing parameters to be passed to agents in a non-positional manner) and self-describing.
For more information, see the reference and Appendix B, More About OCF Resource Agents.


[9] The Pacemaker implementation has been somewhat extended from the OCF Specs, but none of those changes are incompatible with the original OCF specification.
[10] Included with the cluster is the ocf-tester script, which can be useful in this regard.