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
is basically an extension of the Linux Standard Base conventions for init scripts to:
OCF specs have strict definitions of the exit codes that actions must return.
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.