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 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.