Product SiteDocumentation Site

5.2. Resource Classes

Pacemaker supports several classes of agents:

5.2.1. Open Cluster Framework

The OCF standard [9] is basically an extension of the Linux Standard Base conventions for init scripts to:
  • support parameters,
  • make them self-describing, and
  • make them 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 resource agent as environment variables, with the special prefix OCF_RESKEY_. So, a parameter which the user thinks of as ip will be passed to the resource agent as OCF_RESKEY_ip. The number and purpose of the parameters is left to the resource agent; however, the resource agent should use the meta-data command to advertise any that it supports.
The OCF class is the most preferred 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] See  — at least as it relates to resource agents. The Pacemaker implementation has been somewhat extended from the OCF specs, but none of those changes are incompatible with the original OCF specification.
[10] The resource-agents source code includes the ocf-tester script, which can be useful in this regard.