Product SiteDocumentation Site

5.2. Supported Resource Classes

There are three basic classes of agents supported by Pacemaker. In order of encouraged usage they are:

5.2.1. Open Cluster Framework

The OCF Spec (as it relates to resource agents can be found at: [6] and 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 what exit codes actions must return [7] The cluster follows these specifications exactly, and exiting with 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, if you need to be given 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.

[6] Note: The Pacemaker implementation has been somewhat extended from the OCF Specs, but none of those changes are incompatible with the original OCF specification

[7] Included with the cluster is the ocf-tester script which can be useful in this regard.