Product SiteDocumentation Site

4.2. Resource Classes

Pacemaker supports several classes of agents:

4.2.1. Open Cluster Framework

The OCF standard [5] 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. [6]
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 the Resource Agents section of Pacemaker Administration.


[5] See https://github.com/ClusterLabs/OCF-spec/tree/master/ra . The Pacemaker implementation has been somewhat extended from the OCF specs.
[6] The resource-agents source code includes the ocf-tester script, which can be useful in this regard.