Product SiteDocumentation Site

5.2. Clase de Resurse Suportate

There are five classes of agents supported by Pacemaker:
Version 1 of Heartbeat came with its own style of resource agents and it is highly likely that many people have written their own agents based on its conventions. [7]
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 [8] [9] is basically an extension of the Linux Standard Base conventions for init scripts to:
  • suporte parametri
  • să îi facă auto descriptivi şi
  • extensibili
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 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.
Clasa OCF este cea mai preferată din moment ce este un standard al industriei, foarte flexibilă (permiţând parametrii să fie pasaţi agenţilor într-o manieră care nu ţine cont de poziţia acestora) şi auto-descriptivă.

[9] The Pacemaker implementation has been somewhat extended from the OCF Specs, but none of those changes are incompatible with the original OCF specification.
[10] Included with the cluster is the ocf-tester script, which can be useful in this regard.