diff --git a/doc/Pacemaker_Explained/en-US/Ap-Changes.xml b/doc/Pacemaker_Explained/en-US/Ap-Changes.xml index e8484763f5..4e7a3447fa 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-Changes.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-Changes.xml @@ -1,86 +1,86 @@ What Changed in 1.0
New - Failure timeouts. See - New section for resource and operation defaults. See and - Tool for making offline configuration changes. See - Rules, instance_attributes, meta_attributes and sets of operations can be defined once and referenced in multiple places. See - The CIB now accepts XPath-based create/modify/delete operations. See the cibadmin help text. - Multi-dimensional colocation and ordering constraints. See and - The ability to connect to the CIB from non-cluster machines. See - Allow recurring actions to be triggered at known times. See + Failure timeouts. See + New section for resource and operation defaults. See and + Tool for making offline configuration changes. See + Rules, instance_attributes, meta_attributes and sets of operations can be defined once and referenced in multiple places. See + The CIB now accepts XPath-based create/modify/delete operations. See the cibadmin help text. + Multi-dimensional colocation and ordering constraints. See and + The ability to connect to the CIB from non-cluster machines. See + Allow recurring actions to be triggered at known times. See
Changed - + Syntax - - All resource and cluster options now use dashes (-) instead of underscores (_) - master_slave was renamed to master - The attributes container tag was removed - The operation field pre-req has been renamed requires - All operations must have an interval, start/stop must have it set to zero - - + + All resource and cluster options now use dashes (-) instead of underscores (_) + master_slave was renamed to master + The attributes container tag was removed + The operation field pre-req has been renamed requires + All operations must have an interval, start/stop must have it set to zero + + The stonith-enabled option now defaults to true. - The cluster will refuse to start resources if stonith-enabled is true (or unset) and no STONITH resources have been defined - The attributes of colocation and ordering constraints were renamed for clarity. See and - resource-failure-stickiness has been replaced by migration-threshold. See - The parameters for command-line tools have been made consistent - + The cluster will refuse to start resources if stonith-enabled is true (or unset) and no STONITH resources have been defined + The attributes of colocation and ordering constraints were renamed for clarity. See and + resource-failure-stickiness has been replaced by migration-threshold. See + The parameters for command-line tools have been made consistent + Switched to RelaxNGRelaxNG schema validation and libxml2libxml2 parser - - - id fields are now XML IDs which have the following limitations: - - id's cannot contain colons (:) - id's cannot begin with a number - id's must be globally unique (not just unique for that tag) - - - - - Some fields (such as those in constraints that refer to resources) are IDREFs. - This means that they must reference existing resources or objects in order for the configuration to be valid. - Removing an object which is referenced elsewhere will therefore fail. - - - - - The CIB representation, from which a MD5 digest is calculated to verify CIBs on the nodes, has changed. - This means that every CIB update will require a full refresh on any upgraded nodes until the cluster is fully upgraded to 1.0. - This will result in significant performance degradation and it is therefore highly inadvisable to run a mixed 1.0/0.6 cluster for any longer than absolutely necessary. - - - - - + + + id fields are now XML IDs which have the following limitations: + + id's cannot contain colons (:) + id's cannot begin with a number + id's must be globally unique (not just unique for that tag) + + + + + Some fields (such as those in constraints that refer to resources) are IDREFs. + This means that they must reference existing resources or objects in order for the configuration to be valid. + Removing an object which is referenced elsewhere will therefore fail. + + + + + The CIB representation, from which a MD5 digest is calculated to verify CIBs on the nodes, has changed. + This means that every CIB update will require a full refresh on any upgraded nodes until the cluster is fully upgraded to 1.0. + This will result in significant performance degradation and it is therefore highly inadvisable to run a mixed 1.0/0.6 cluster for any longer than absolutely necessary. + + + + + Ping node information no longer needs to be added to ha.cf. Simply include the lists of hosts in your ping resource(s). - +
Removed - + Syntax - - - - It is no longer possible to set resource meta options as top-level attributes. Use meta attributes instead. - - - - - Resource and operation defaults are no longer read from crm_config. See and instead. - - - - + + + + It is no longer possible to set resource meta options as top-level attributes. Use meta attributes instead. + + + + + Resource and operation defaults are no longer read from crm_config. See and instead. + + + +
diff --git a/doc/Pacemaker_Explained/en-US/Ap-Debug.xml b/doc/Pacemaker_Explained/en-US/Ap-Debug.xml index 3a92e4f29e..246081a0fe 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-Debug.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-Debug.xml @@ -1,122 +1,122 @@ Debugging Cluster Startup
Corosync
- Prerequisites - - Minimum logging configuration - + Prerequisites + + Minimum logging configuration + # /etc/init.d/openais start - - + + logging { to_syslog: yes syslog_facility: daemon } - - - - Whatever other logging you have, these two lines are required for Pacemaker clusters - - + + + + Whatever other logging you have, these two lines are required for Pacemaker clusters + +
- Confirm Corosync Started -
- Expected output when starting openais - + Confirm Corosync Started +
+ Expected output when starting openais + # /etc/init.d/openais start - - + + Starting Corosync daemon (aisexec): starting... rc=0: OK - - -
- -
- Expected log messages - startup - + + +
+ +
+ Expected log messages - startup + # grep -e "openais.*network interface" -e "AIS Executive Service" /var/log/messages - - + + Aug 27 16:23:37 test1 openais[26337]: [MAIN ] AIS Executive Service RELEASE 'subrev 1152 version 0.80' Aug 27 16:23:38 test1 openais[26337]: [MAIN ] AIS Executive Service: started and ready to provide service. Aug 27 16:23:38 test1 openais[26337]: [TOTEM] The network interface [192.168.9.41] is now up. - - - - The versions may differ, but you should see Corosync indicate it started and sucessfully attached to the machine's network interface - -
- -
- Expected log messages - membership - + + + + The versions may differ, but you should see Corosync indicate it started and sucessfully attached to the machine's network interface + +
+ +
+ Expected log messages - membership + # grep CLM /var/log/messages - - + + Aug 27 16:53:15 test1 openais[2166]: [CLM ] CLM CONFIGURATION CHANGE Aug 27 16:53:15 test1 openais[2166]: [CLM ] New Configuration: Aug 27 16:53:15 test1 openais[2166]: [CLM ] Members Left: Aug 27 16:53:15 test1 openais[2166]: [CLM ] Members Joined: Aug 27 16:53:15 test1 openais[2166]: [CLM ] CLM CONFIGURATION CHANGE Aug 27 16:53:15 test1 openais[2166]: [CLM ] New Configuration: - Aug 27 16:53:15 test1 openais[2166]: [CLM ] r(0) ip(192.168.9.41) + Aug 27 16:53:15 test1 openais[2166]: [CLM ] r(0) ip(192.168.9.41) Aug 27 16:53:15 test1 openais[2166]: [CLM ] Members Left: Aug 27 16:53:15 test1 openais[2166]: [CLM ] Members Joined: - Aug 27 16:53:15 test1 openais[2166]: [CLM ] r(0) ip(192.168.9.41) + Aug 27 16:53:15 test1 openais[2166]: [CLM ] r(0) ip(192.168.9.41) Aug 27 16:53:15 test1 openais[2166]: [CLM ] got nodejoin message 192.168.9.41 - - - - The exact messages will differ, but you should see a new membership formed with the real IP address of your node - -
+ +
+ + The exact messages will differ, but you should see a new membership formed with the real IP address of your node + +
- Checking Pacemaker - Now that we have confirmed that Corosync is functional we can check the rest of the stack. + Checking Pacemaker + Now that we have confirmed that Corosync is functional we can check the rest of the stack. -
- Expected Pacemaker startup logging for Corosync - +
+ Expected Pacemaker startup logging for Corosync + # grep pcmk_plugin_init /var/log/messages - - + + Aug 27 16:53:15 test1 openais[2166]: [pcmk ] info: pcmk_plugin_init: CRM: Initialized Aug 27 16:53:15 test1 openais[2166]: [pcmk ] Logging: Initialized pcmk_plugin_init Aug 27 16:53:15 test1 openais[2166]: [pcmk ] info: pcmk_plugin_init: Service: 9 Aug 27 16:53:15 test1 openais[2166]: [pcmk ] info: pcmk_plugin_init: Local hostname: test1 - - - - If you don't see these messages, or some like them, there is likely a problem finding or loading the pacemaker plugin. - -
+ +
+ + If you don't see these messages, or some like them, there is likely a problem finding or loading the pacemaker plugin. + +
-
- Expected process listing on a 64-bit machine - +
+ Expected process listing on a 64-bit machine + # ps axf - - + + 3718 ? Ssl 0:05 /usr/sbin/aisexec 3723 ? SLs 0:00 \_ /usr/lib64/heartbeat/stonithd 3724 ? S 0:05 \_ /usr/lib64/heartbeat/cib 3725 ? S 0:21 \_ /usr/lib64/heartbeat/lrmd 3726 ? S 0:01 \_ /usr/lib64/heartbeat/attrd 3727 ? S 0:00 \_ /usr/lib64/heartbeat/pengine 3728 ? S 0:01 \_ /usr/lib64/heartbeat/crmd - - - - On 32-bit systems the exact path may differ, but all the above processes should be listed. - -
+ +
+ + On 32-bit systems the exact path may differ, but all the above processes should be listed. + +
diff --git a/doc/Pacemaker_Explained/en-US/Ap-FAQ.xml b/doc/Pacemaker_Explained/en-US/Ap-FAQ.xml index 0743f6c63e..9e6d69f4c3 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-FAQ.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-FAQ.xml @@ -1,95 +1,95 @@ FAQ - History - - + History + + Why is the Project Called PacemakernamingPacemaker? - - + + First of all, the reason its not called the CRM is because of the abundance of terms that are commonly abbreviated to those three letters. - + The Pacemaker name came from Kham, a good friend of mine, and was originally used by a Java GUI that I was prototyping in early 2007. - Alas other commitments have prevented the GUI from progressing much and, when it came time to choose a name for this project, Lars suggested it was an even better fit for an independent CRM. - - - The idea stems from the analogy between the role of this software and that of the little device that keeps the human heart pumping. - Pacemaker monitors the cluster and intervenes when necessary to ensure the smooth operation of the services it provides. - - There were a number of other names (and acronyms) tossed around, but suffice to say "Pacemaker" was the best - - - - - Why was the Pacemaker Project Created? - - - The decision was made to spin-off the CRM into its own project after the 2.1.3 Heartbeat release in order to - - support both the Corosync and Heartbeat cluster stacks equally - decouple the release cycles of two projects at very different stages of their life-cycles - foster the clearer package boundaries, thus leading to - better and more stable interfaces - - - + Alas other commitments have prevented the GUI from progressing much and, when it came time to choose a name for this project, Lars suggested it was an even better fit for an independent CRM. + + + The idea stems from the analogy between the role of this software and that of the little device that keeps the human heart pumping. + Pacemaker monitors the cluster and intervenes when necessary to ensure the smooth operation of the services it provides. + + There were a number of other names (and acronyms) tossed around, but suffice to say "Pacemaker" was the best + + + + + Why was the Pacemaker Project Created? + + + The decision was made to spin-off the CRM into its own project after the 2.1.3 Heartbeat release in order to + + support both the Corosync and Heartbeat cluster stacks equally + decouple the release cycles of two projects at very different stages of their life-cycles + foster the clearer package boundaries, thus leading to + better and more stable interfaces + + + - Setup - - + Setup + + What Messaging Layers Messaging Layers are Supported? - - - - Corosync () - Heartbeat () - - - - - - Can I Choose which Messaging Layer to use at Run Time? - - - Yes. The CRM will automatically detect which started it and behave accordingly. - - - - - Can I Have a Mixed Heartbeat-Corosync Cluster? - - - No. - - - - - Which Messaging Layer Should I Choose? - - - This is discussed in . - - - - - Where Can I Get Pre-built Packages? - - + + + + Corosync () + Heartbeat () + + + + + + Can I Choose which Messaging Layer to use at Run Time? + + + Yes. The CRM will automatically detect which started it and behave accordingly. + + + + + Can I Have a Mixed Heartbeat-Corosync Cluster? + + + No. + + + + + Which Messaging Layer Should I Choose? + + + This is discussed in . + + + + + Where Can I Get Pre-built Packages? + + Official packages for most major .rpm and based distributions are available from the ClusterLabs Website. For Debian packages, building from source and details on using the above repositories, see our installation page. - - - - - What Versions of Pacemaker Are Supported? - - + + + + + What Versions of Pacemaker Are Supported? + + Please refer to the Releases page for an up-to-date list of versions supported directly by the project. - When seeking assistance, please try to ensure you have one of these versions. - - + When seeking assistance, please try to ensure you have one of these versions. + + diff --git a/doc/Pacemaker_Explained/en-US/Ap-Install.xml b/doc/Pacemaker_Explained/en-US/Ap-Install.xml index 58571557b0..169bed1ad8 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-Install.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-Install.xml @@ -1,107 +1,107 @@ Installation
Choosing a <indexterm significance="preferred"><primary>Cluster Stack</primary><secondary>choosing one</secondary></indexterm>Cluster Stack Ultimately the choice of cluster stack is a personal decision that must be made in the context of you or your company's needs and strategic direction. Pacemaker currently functions equally well with both stacks. Here are some factors that may influence the decision: - + SUSE/Novell, Red Hat and Oracle are all putting their collective weight behind the Corosync cluster stack. - - + + Cluster StackCorosync CorosyncCorosync is an OSI Certified implementation of an industry standard (the Service Availability Forum Application Interface Specification). - - + + Using Corosync gives your applications access to the following additional cluster services - - - checkpoint service - - - distributed locking service - - - extended virtual synchronization service - - - cluster closed process group service - - - - + + + checkpoint service + + + distributed locking service + + + extended virtual synchronization service + + + cluster closed process group service + + + + It is likely that Pacemaker, at some point in the future, will make use of some of these additional services not provided by Heartbeat - - - To date, Pacemaker has received less real-world testing on Corosync than it has on + + + To date, Pacemaker has received less real-world testing on Corosync than it has on Cluster StackHeartbeat HeartbeatHeartbeat. - +
Enabling Pacemaker
- For Corosync - The Corosync configuration is normally located in /etc/corosync/corosync.conf and an example for a machine with an address of 1.2.3.4 in a cluster communicating on port 1234 (without peer authentication and message encryption) is shown below. - - An example Corosync configuration file - totem { + For Corosync + The Corosync configuration is normally located in /etc/corosync/corosync.conf and an example for a machine with an address of 1.2.3.4 in a cluster communicating on port 1234 (without peer authentication and message encryption) is shown below. + + An example Corosync configuration file + totem { version: 2 secauth: off threads: 0 interface { ringnumber: 0 bindnetaddr: 1.2.3.4 mcastaddr: 226.94.1.1 mcastport: 1234 } } logging { fileline: off to_syslog: yes syslog_facility: daemon } amf { mode: disabled } - - - The logging should be mostly obvious and the amf section refers to the Availability Management Framework and is not covered in this document. - The interesting part of the configuration is the totem section. This is where we define how the node can communicate with the rest of the cluster and what protocol version and options (including encryption + + + The logging should be mostly obvious and the amf section refers to the Availability Management Framework and is not covered in this document. + The interesting part of the configuration is the totem section. This is where we define how the node can communicate with the rest of the cluster and what protocol version and options (including encryption Please consult the Corosync website and documentation for details on enabling encryption and peer authentication for the cluster. - ) it should use. Beginners are encouraged to use the values shown and modify the interface section based on their network. - It is also possible to configure Corosync for an IPv6 based environment. Simply configure bindnetaddr and mcastaddr with their IPv6 equivalents, eg. - - Example options for an IPv6 environment - bindnetaddr: fec0::1:a800:4ff:fe00:20 + ) it should use. Beginners are encouraged to use the values shown and modify the interface section based on their network. + It is also possible to configure Corosync for an IPv6 based environment. Simply configure bindnetaddr and mcastaddr with their IPv6 equivalents, eg. + + Example options for an IPv6 environment + bindnetaddr: fec0::1:a800:4ff:fe00:20 mcastaddr: ff05::1 - - - To tell Corosync to use the Pacemaker cluster manager, add the following fragment to a functional Corosync configuration and restart the cluster. - - Configuration fragment for enabling Pacemaker under Corosync - aisexec { + + + To tell Corosync to use the Pacemaker cluster manager, add the following fragment to a functional Corosync configuration and restart the cluster. + + Configuration fragment for enabling Pacemaker under Corosync + aisexec { user: root group: root } service { name: pacemaker ver: 0 } - - - The cluster needs to be run as root so that its child processes (the lrmd in particular) have sufficient privileges to perform the actions requested of it. After all, a cluster manager that can't add an IP address or start apache is of little use. - The second directive is the one that actually instructs the cluster to run Pacemaker. + + + The cluster needs to be run as root so that its child processes (the lrmd in particular) have sufficient privileges to perform the actions requested of it. After all, a cluster manager that can't add an IP address or start apache is of little use. + The second directive is the one that actually instructs the cluster to run Pacemaker.
- For Heartbeat - Add the following to a functional ha.cf configuration file and restart Heartbeat: - - Configuration fragment for enabling Pacemaker under Heartbeat - crm respawn - - + For Heartbeat + Add the following to a functional ha.cf configuration file and restart Heartbeat: + + Configuration fragment for enabling Pacemaker under Heartbeat + crm respawn + +
diff --git a/doc/Pacemaker_Explained/en-US/Ap-LSB.xml b/doc/Pacemaker_Explained/en-US/Ap-LSB.xml index 2a7a5aed1c..4a267335be 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-LSB.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-LSB.xml @@ -1,62 +1,62 @@ init-Script LSB Compliance The relevant part of LSB init scriptsinit scriptscompatibilityLSB spec - + includes a description of all the return codes listed here. Assuming some_service is configured correctly and currently not active, the following sequence will help you determine if it is LSB compatible: - Start (stopped): - /etc/init.d/some_service start ; echo "result: $?" - - Did the service start? - Did the command print result: 0 (in addition to the regular output)? - + Start (stopped): + /etc/init.d/some_service start ; echo "result: $?" + + Did the service start? + Did the command print result: 0 (in addition to the regular output)? + - Status (running): + Status (running): /etc/init.d/some_service status ; echo "result: $?" - - Did the script accept the command? - Did the script indicate the service was running? - Did the command print result: 0 (in addition to the regular output)? - + + Did the script accept the command? + Did the script indicate the service was running? + Did the command print result: 0 (in addition to the regular output)? + Start (running): /etc/init.d/some_service start ; echo "result: $?" - - Is the service still running? - Did the command print result: 0 (in addition to the regular output)? - + + Is the service still running? + Did the command print result: 0 (in addition to the regular output)? + - Stop (running): + Stop (running): /etc/init.d/some_service stop ; echo "result: $?" - - Was the service stopped? - Did the command print result: 0 (in addition to the regular output)? - + + Was the service stopped? + Did the command print result: 0 (in addition to the regular output)? + Status (stopped): /etc/init.d/some_service status ; echo "result: $?" - - Did the script accept the command? - Did the script indicate the service was not running? - Did the command print result: 3 (in addition to the regular output)? - + + Did the script accept the command? + Did the script indicate the service was not running? + Did the command print result: 3 (in addition to the regular output)? + - Stop (stopped): + Stop (stopped): /etc/init.d/some_service stop ; echo "result: $?" - - Is the service still stopped? - Did the command print result: 0 (in addition to the regular output)? - + + Is the service still stopped? + Did the command print result: 0 (in addition to the regular output)? + - Status (failed): - This step is not readily testable and relies on manual inspection of the script. - The script can use one of the error codes (other than 3) listed in the LSB spec to indicate that it is active but failed. This tells the cluster that before moving the resource to another node, it needs to stop it on the existing one first. + Status (failed): + This step is not readily testable and relies on manual inspection of the script. + The script can use one of the error codes (other than 3) listed in the LSB spec to indicate that it is active but failed. This tells the cluster that before moving the resource to another node, it needs to stop it on the existing one first. If the answer to any of the above questions is no, then the script is not LSB compliant. Your options are then to either fix the script or write an OCF agent based on the existing script. diff --git a/doc/Pacemaker_Explained/en-US/Ap-OCF.xml b/doc/Pacemaker_Explained/en-US/Ap-OCF.xml index d4f2b3120c..0003466ff5 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-OCF.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-OCF.xml @@ -1,254 +1,254 @@ More About OCF Resource Agents
Location of Custom Scripts OCF Resource AgentsOCF Resource Agents are found in /usr/lib/ocf/resource.d/provider. - When creating your own agents, you are encouraged to create a new directory under /usr/lib/ocf/resource.d/ so that they are not confused with (or overwritten by) the agents shipped with Heartbeat. - So, for example, if you chose the provider name of bigCorp and wanted a new resource named bigApp, you would create a script called /usr/lib/ocf/resource.d/bigCorp/bigApp and define a resource: + When creating your own agents, you are encouraged to create a new directory under /usr/lib/ocf/resource.d/ so that they are not confused with (or overwritten by) the agents shipped with Heartbeat. + So, for example, if you chose the provider name of bigCorp and wanted a new resource named bigApp, you would create a script called /usr/lib/ocf/resource.d/bigCorp/bigApp and define a resource: <primitive id="custom-app" class="ocf" provider="bigCorp" type="bigApp"/>
Actions All OCF Resource Agents are required to implement the following actions - Required Actions for OCF Agents - + Required Actions for OCF Agents + Action Description Instructions - - + + start action actionstartstart Start the resource Return 0 on success and an appropriate error code otherwise. Must not report success until the resource is fully active. stop action actionstopstop Stop the resource Return 0 on success and an appropriate error code otherwise. Must not report success until the resource is fully stopped. monitor action actionmonitormonitor Check the resource's state - Exit 0 if the resource is running, 7 if it is stopped, and anything else if it is failed. - NOTE: The monitor script should test the state of the resource on the local machine only. + Exit 0 if the resource is running, 7 if it is stopped, and anything else if it is failed. + NOTE: The monitor script should test the state of the resource on the local machine only. meta-data action actionmeta-datameta-data Describe the resource - Provide information about this resource as an XML snippet. Exit with 0. - NOTE: This is not performed as root. + Provide information about this resource as an XML snippet. Exit with 0. + NOTE: This is not performed as root. validate-all action actionvalidate-allvalidate-all Verify the supplied parameters Exit with 0 if parameters are valid, 2 if not valid, 6 if resource is not configured.
Additional requirements (not part of the OCF specs) are placed on agents that will be used for advanced concepts like clones and multi-state resources. - Optional Actions for OCF Agents - + Optional Actions for OCF Agents + Action Description Instructions promote action actionpromotepromote Promote the local instance of a multi-state resource to the master/primary state. Return 0 on success. demote action actiondemotedemote Demote the local instance of a multi-state resource to the slave/secondary state. Return 0 on success. notify action actionnotifynotify Used by the cluster to send the agent pre and post notification events telling the resource what has happened and will happen. Must not fail. Must exit with 0.
One action specified in the OCF specs is not currently used by the cluster: - recover - a variant of the start action, this should try to recover a resource locally. + recover - a variant of the start action, this should try to recover a resource locally. Remember to use ocf-testerocf-tester to verify that your new agent complies with the OCF standard properly.
How are OCF Return Codes Interpreted? The first thing the cluster does is to check the return code against the expected result. If the result does not match the expected value, then the operation is considered to have failed and recovery action is initiated. There are three types of failure recovery: - Types of recovery performed by the cluster - + Types of recovery performed by the cluster + Type Description Action Taken by the Cluster soft error type error typesoftsoft A transient error occurred Restart the resource or move it to a new location hard error type error typehardhard A non-transient error that may be specific to the current node occurred Move the resource elsewhere and prevent it from being retried on the current node fatal error type error typefatalfatal A non-transient error that will be common to all cluster nodes (eg. a bad configuration was specified) Stop the resource and prevent it from being started on any cluster node
Assuming an action is considered to have failed, the following table outlines the different OCF return codes and the type of recovery the cluster will initiate when it is received. - OCF Return Codes and their Recovery Types - + OCF Return Codes and their Recovery Types + RC OCF Alias Description RT return code00 OCF_SUCCESS Environment VariableOCF_SUCCESS return codeOCF_SUCCESSOCF_SUCCESS Success. The command completed successfully. This is the expected result for all start, stop, promote and demote commands. soft return code11 OCF_ERR_GENERIC Environment VariableOCF_ERR_GENERIC return codeOCF_ERR_GENERIC OCF_ERR_GENERIC Generic "there was a problem" error code. soft return code22 OCF_ERR_ARGS Environment VariableOCF_ERR_ARGS return codeOCF_ERR_ARGSOCF_ERR_ARGS The resource's configuration is not valid on this machine. Eg. refers to a location/tool not found on the node. hard return code33 OCF_ERR_UNIMPLEMENTED Environment VariableOCF_ERR_UNIMPLEMENTED return codeOCF_ERR_UNIMPLEMENTEDOCF_ERR_UNIMPLEMENTED The requested action is not implemented. hard return code44 OCF_ERR_PERM Environment VariableOCF_ERR_PERM return codeOCF_ERR_PERMOCF_ERR_PERM The resource agent does not have sufficient privileges to complete the task. hard return code55 OCF_ERR_INSTALLED Environment VariableOCF_ERR_INSTALLED return codeOCF_ERR_INSTALLEDOCF_ERR_INSTALLED The tools required by the resource are not installed on this machine. hard return code66 OCF_ERR_CONFIGURED Environment VariableOCF_ERR_CONFIGURED return codeOCF_ERR_CONFIGUREDOCF_ERR_CONFIGURED The resource's configuration is invalid. Eg. required parameters are missing. fatal return code77 OCF_NOT_RUNNING Environment VariableOCF_NOT_RUNNING return codeOCF_NOT_RUNNINGOCF_NOT_RUNNING The resource is safely stopped. The cluster will not attempt to stop a resource that returns this for any action. N/A return code88 OCF_RUNNING_MASTER Environment VariableOCF_RUNNING_MASTER return codeOCF_RUNNING_MASTEROCF_RUNNING_MASTER The resource is running in Master mode. soft return code99 OCF_FAILED_MASTER Environment VariableOCF_FAILED_MASTER return codeOCF_FAILED_MASTEROCF_FAILED_MASTER The resource is in Master mode but has failed. The resource will be demoted, stopped and then started (and possibly promoted) again. soft other return codes return codeotherother NA Custom error code. soft
Although counterintuitive, even actions that return 0 (aka. OCF_SUCCESS) can be considered to have failed. This can happen when a resource that is expected to be in the Master state is found running as a Slave, or when a resource is found active on multiple machines.
Exceptions - - Non-recurring monitor actions (probes) that find a resource active (or in Master mode) will not result in recovery action unless it is also found active elsewhere - The recovery action taken when a resource is found active more than once is determined by the multiple-active property of the resource - Recurring actions that return OCF_ERR_UNIMPLEMENTED do not cause any type of recovery - + + Non-recurring monitor actions (probes) that find a resource active (or in Master mode) will not result in recovery action unless it is also found active elsewhere + The recovery action taken when a resource is found active more than once is determined by the multiple-active property of the resource + Recurring actions that return OCF_ERR_UNIMPLEMENTED do not cause any type of recovery +
diff --git a/doc/Pacemaker_Explained/en-US/Ap-Samples.xml b/doc/Pacemaker_Explained/en-US/Ap-Samples.xml index 363b37ed5d..ebb7a9798c 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-Samples.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-Samples.xml @@ -1,129 +1,129 @@ Sample Configurations
An Empty Configuration An <indexterm significance="preferred"><primary>Empty Configuration</primary></indexterm><indexterm significance="preferred"><primary>Configuration</primary><secondary>Empty</secondary></indexterm>empty configuration - + ]]>
A <indexterm significance="preferred"><primary>Simple</primary><secondary>Configuration</secondary></indexterm><indexterm significance="preferred"><primary>Configuration</primary><secondary>Simple</secondary></indexterm>Simple Configuration - 2 nodes, some cluster options and a resource + 2 nodes, some cluster options and a resource ]]> In this example, we have one resource (an IP address) that we check every five minutes and will run on host c001n01 until either the resource fails 10 times or the host shuts down.
An <indexterm significance="preferred"><primary>Advanced</primary><secondary>Configuration</secondary></indexterm><indexterm significance="preferred"><primary>Configuration</primary><secondary>Advanced</secondary></indexterm>Advanced Configuration - groups and clones with stonith + groups and clones with stonith ]]>
diff --git a/doc/Pacemaker_Explained/en-US/Ap-Upgrade-Config.xml b/doc/Pacemaker_Explained/en-US/Ap-Upgrade-Config.xml index a7d2971ad2..a011eb97b6 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-Upgrade-Config.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-Upgrade-Config.xml @@ -1,96 +1,96 @@ Upgrading the Configuration from 0.6
Preparation Upgrading the Configuration ConfigurationUpgrading DownloadDTD DTDDownload Download the latest DTD and ensure your configuration validates.
Perform the upgrade
- Upgrade the software - Refer to the appendix: + Upgrade the software + Refer to the appendix:
- Upgrade the Configuration - As XML is not the friendliest of languages, it is common for cluster administrators to have scripted some of their activities. In such cases, it is likely that those scripts will not work with the new 1.0 syntax. - In order to support such environments, it is actually possible to continue using the old 0.6 syntax. - The downside is, however, that not all the new features will be available and there is a performance impact since the cluster must do a non-persistent configuration upgrade before each transition. So while using the old syntax is possible, it is not advisable to continue using it indefinitely. - Even if you wish to continue using the old syntax, it is advisable to follow the upgrade procedure to ensure that the cluster is able to use your existing configuration (since it will perform much the same task internally). - - + Upgrade the Configuration + As XML is not the friendliest of languages, it is common for cluster administrators to have scripted some of their activities. In such cases, it is likely that those scripts will not work with the new 1.0 syntax. + In order to support such environments, it is actually possible to continue using the old 0.6 syntax. + The downside is, however, that not all the new features will be available and there is a performance impact since the cluster must do a non-persistent configuration upgrade before each transition. So while using the old syntax is possible, it is not advisable to continue using it indefinitely. + Even if you wish to continue using the old syntax, it is advisable to follow the upgrade procedure to ensure that the cluster is able to use your existing configuration (since it will perform much the same task internally). + + Create a shadow copyexample for upgradingshadow copy to work with - crm_shadow --create upgrade06 - - + crm_shadow --create upgrade06 + + Verify the ConfigurationVerifyVerifyConfigurationconfiguration is valid - crm_verify --live-check - - + crm_verify --live-check + + Fix any errors or warnings - - + + Perform the upgrade: cibadmin --upgrade - If this step fails, there are three main possibilities: - - The configuration was not valid to start with - go back to step 2 - The transformation failed - report a bug or email the project - The transformation was successful but produced an invalid result - The most common reason is ID values being repeated or invalid. Pacemaker 1.0 is much stricter regarding this type of validation. - - - If the result of the transformation is invalid, you may see a number of errors from the validation library. If these are not helpful, visit and/or try the procedure described below under . - - - Check the changes + If this step fails, there are three main possibilities: + + The configuration was not valid to start with - go back to step 2 + The transformation failed - report a bug or email the project + The transformation was successful but produced an invalid result + The most common reason is ID values being repeated or invalid. Pacemaker 1.0 is much stricter regarding this type of validation. + + + If the result of the transformation is invalid, you may see a number of errors from the validation library. If these are not helpful, visit and/or try the procedure described below under . + + + Check the changes crm_shadow --diff - If at this point there is anything about the upgrade that you wish to fine-tune (for example, to change some of the automatic IDs) now is the time to do so. Since the shadow configuration is not in use by the cluster, it is safe to edit the file manually: + If at this point there is anything about the upgrade that you wish to fine-tune (for example, to change some of the automatic IDs) now is the time to do so. Since the shadow configuration is not in use by the cluster, it is safe to edit the file manually: crm_shadow --edit - This will open the configuration in your favorite editor (whichever is specified by the standard $EDITOR environment variable). - - - Preview how the cluster will react - Test what the cluster will do when you upload the new configuration - # ptest -VVVVV --live-check --save-dotfile upgrade06.dot + This will open the configuration in your favorite editor (whichever is specified by the standard $EDITOR environment variable). + + + Preview how the cluster will react + Test what the cluster will do when you upload the new configuration + # ptest -VVVVV --live-check --save-dotfile upgrade06.dot # graphviz upgrade06.dot - - Verify that either no resource actions will occur or that you are happy with any that are scheduled. - If the output contains actions you do not expect (possibly due to changes to the score calculations), you may need to make further manual changes. - See for further details on how to interpret the output of ptest. - - - + + Verify that either no resource actions will occur or that you are happy with any that are scheduled. + If the output contains actions you do not expect (possibly due to changes to the score calculations), you may need to make further manual changes. + See for further details on how to interpret the output of ptest. + + + Upload the changes crm_shadow --commit upgrade06 --force - If this step fails, something really strange has occurred. You should report a bug. - - + If this step fails, something really strange has occurred. You should report a bug. + +
- Manually Upgrading the Configuration + Manually Upgrading the Configuration It is also possible to perform the ConfigurationUpgrade manuallyconfiguration upgrade steps manually. To do this - - - Locate the upgrade06.xsl conversion script or download the latest version from version control - - + + + Locate the upgrade06.xsl conversion script or download the latest version from version control + + Convert the XMLConvertXML blob: xsltproc /path/to/upgrade06.xsl config06.xml > config10.xml - - - Locate the pacemaker.rng script. - + + + Locate the pacemaker.rng script. + Check the ValidateXMLxmllintValidate XMLXML validity: xmllint --relaxng /path/to/pacemaker.rng config10.xml - - - - The advantage of this method is that it can be performed without the cluster running and any validation errors should be more informative (despite being generated by the same library!) since they include line numbers. + + + + The advantage of this method is that it can be performed without the cluster running and any validation errors should be more informative (despite being generated by the same library!) since they include line numbers.
diff --git a/doc/Pacemaker_Explained/en-US/Ap-Upgrade.xml b/doc/Pacemaker_Explained/en-US/Ap-Upgrade.xml index 5fc979631c..70d5f69c6f 100644 --- a/doc/Pacemaker_Explained/en-US/Ap-Upgrade.xml +++ b/doc/Pacemaker_Explained/en-US/Ap-Upgrade.xml @@ -1,258 +1,258 @@ Upgrading Cluster Software
Version Compatibility - When releasing newer versions we take care to make sure we are backwards compatible with older versions. While you will always be able to upgrade from version x to x+1, in order to continue to produce high quality software it may occasionally be necessary to drop compatibility with older versions. - There will always be an upgrade path from any series-2 release to any other series-2 release. - There are three approaches to upgrading your cluster software: - - Complete Cluster Shutdown - Rolling (node by node) - Disconnect and Reattach - - Each method has advantages and disadvantages, some of which are listed in the table below, and you should chose the one most appropriate to your needs. - - Summary of Upgrade Methodologies - + When releasing newer versions we take care to make sure we are backwards compatible with older versions. While you will always be able to upgrade from version x to x+1, in order to continue to produce high quality software it may occasionally be necessary to drop compatibility with older versions. + There will always be an upgrade path from any series-2 release to any other series-2 release. + There are three approaches to upgrading your cluster software: + + Complete Cluster Shutdown + Rolling (node by node) + Disconnect and Reattach + + Each method has advantages and disadvantages, some of which are listed in the table below, and you should chose the one most appropriate to your needs. +
+ Summary of Upgrade Methodologies + - Type - Available between all software versions - Service Outage During Upgrade - Service Recovery During Upgrade - Exercises Failover Logic/Configuration - - Allows change of cluster stack type - + Type + Available between all software versions + Service Outage During Upgrade + Service Recovery During Upgrade + Exercises Failover Logic/Configuration + + Allows change of cluster stack type + Cluster Stackswitching between - For example, switching from Heartbeat to Corosync. - Consult the Heartbeat or Corosync documentation to see if upgrading them to a newer version is also supported. - - - + For example, switching from Heartbeat to Corosync. + Consult the Heartbeat or Corosync documentation to see if upgrading them to a newer version is also supported. + + + - - + + UpgradeShutdown Shutdown Upgrade Shutdown - yes - always - N/A - no - yes + yes + always + N/A + no + yes UpgradeRolling Rolling Upgrade Rolling - no - always - yes - yes - no + no + always + yes + yes + no UpgradeReattach Reattach Upgrade Reattach - yes - only due to failure - no - no - yes + yes + only due to failure + no + no + yes - - -
+ + +
- Complete Cluster Shutdown - In this scenario one shuts down all cluster nodes and resources and upgrades all the nodes before restarting the cluster. -
Procedure - - + Complete Cluster Shutdown + In this scenario one shuts down all cluster nodes and resources and upgrades all the nodes before restarting the cluster. +
Procedure + + On each node: - - - Shutdown the cluster stack (Heartbeat or Corosync) - - - - Upgrade the Pacemaker software. - This may also include upgrading the cluster stack and/or the underlying operating system. - - - - - + + + Shutdown the cluster stack (Heartbeat or Corosync) + + + + Upgrade the Pacemaker software. + This may also include upgrading the cluster stack and/or the underlying operating system. + + + + + Check the configuration manually or with the crm_verify tool if available. - - + + On each node: - - - - Start the cluster stack. - This can be either Corosync or Heartbeat and does not need to be the same as the previous cluster stack. - - - - - -
+ + + + Start the cluster stack. + This can be either Corosync or Heartbeat and does not need to be the same as the previous cluster stack. + + + +
+
+
- Rolling (node by node) - In this scenario each node is removed from the cluster, upgraded and then brought back online until all nodes are running the newest version. - - - This method is currently broken between Pacemaker 0.6.x and 1.0.x. - - - Measures have been put into place to ensure rolling upgrades always work for versions after 1.0.0. - If there is sufficient demand, the work to repair 0.6 -> 1.0 compatibility will be carried out. - Otherwise, please try one of the other upgrade strategies. - Detach/Reattach is a particularly good option for most people. - - + Rolling (node by node) + In this scenario each node is removed from the cluster, upgraded and then brought back online until all nodes are running the newest version. + + + This method is currently broken between Pacemaker 0.6.x and 1.0.x. + + + Measures have been put into place to ensure rolling upgrades always work for versions after 1.0.0. + If there is sufficient demand, the work to repair 0.6 -> 1.0 compatibility will be carried out. + Otherwise, please try one of the other upgrade strategies. + Detach/Reattach is a particularly good option for most people. + + -
- Procedure - On each node: - - +
+ Procedure + On each node: + + Shutdown the cluster stack (Heartbeat or Corosync) - - + + Upgrade the Pacemaker software. This may also include upgrading the cluster stack and/or the underlying operating system. - - - On the first node, check the configuration manually or with the crm_verify tool if available. - - - - + + + On the first node, check the configuration manually or with the crm_verify tool if available. + + + + - Start the cluster stack. - This must be the same type of cluster stack (Corosync or Heartbeat) that the rest of the cluster is using. - Upgrading Corosync/Heartbeat may also be possible, please consult the documentation for those projects to see if the two versions will be compatible. - - - - Repeat for each node in the cluster. -
-
- Version Compatibility - - Version Compatibility Table - + Start the cluster stack. + This must be the same type of cluster stack (Corosync or Heartbeat) that the rest of the cluster is using. + Upgrading Corosync/Heartbeat may also be possible, please consult the documentation for those projects to see if the two versions will be compatible. + + + + Repeat for each node in the cluster. + +
+ Version Compatibility +
+ Version Compatibility Table + - - Version being Installed - Oldest Compatible Version - + + Version being Installed + Oldest Compatible Version + - Pacemaker 1.0.x - Pacemaker 1.0.0 - - - Pacemaker 0.7.x - Pacemaker 0.6 or Heartbeat 2.1.3 - - - Pacemaker 0.6.x - Heartbeat 2.0.8 - - - Heartbeat 2.1.3 (or less) - Heartbeat 2.0.4 - - - Heartbeat 2.0.4 (or less) - Heartbeat 2.0.0 - - - Heartbeat 2.0.0 - None. Use an alternate upgrade strategy. + Pacemaker 1.0.x + Pacemaker 1.0.0 + + + Pacemaker 0.7.x + Pacemaker 0.6 or Heartbeat 2.1.3 + + + Pacemaker 0.6.x + Heartbeat 2.0.8 + + + Heartbeat 2.1.3 (or less) + Heartbeat 2.0.4 + + + Heartbeat 2.0.4 (or less) + Heartbeat 2.0.0 + + + Heartbeat 2.0.0 + None. Use an alternate upgrade strategy. -
-
-
- Crossing Compatibility Boundaries - Rolling upgrades that cross compatibility boundaries must be preformed in multiple steps. For example, to perform a rolling update from Heartbeat 2.0.1 to Pacemaker 0.6.6 one must: - - Perform a rolling upgrade from Heartbeat 2.0.1 to Heartbeat 2.0.4 - Perform a rolling upgrade from Heartbeat 2.0.4 to Heartbeat 2.1.3 - Perform a rolling upgrade from Heartbeat 2.1.3 to Pacemaker 0.6.6 - -
+ +
+
+ Crossing Compatibility Boundaries + Rolling upgrades that cross compatibility boundaries must be preformed in multiple steps. For example, to perform a rolling update from Heartbeat 2.0.1 to Pacemaker 0.6.6 one must: + + Perform a rolling upgrade from Heartbeat 2.0.1 to Heartbeat 2.0.4 + Perform a rolling upgrade from Heartbeat 2.0.4 to Heartbeat 2.1.3 + Perform a rolling upgrade from Heartbeat 2.1.3 to Pacemaker 0.6.6 + +
- Disconnect and Reattach - A variant of a complete cluster shutdown, but the resources are left active and get re-detected when the cluster is restarted. -
- Procedure - - + Disconnect and Reattach + A variant of a complete cluster shutdown, but the resources are left active and get re-detected when the cluster is restarted. +
+ Procedure + + - Tell the cluster to stop managing services. - This is required to allow the services to remain active after the cluster shuts down. + Tell the cluster to stop managing services. + This is required to allow the services to remain active after the cluster shuts down. crm_attribute -t crm_config -n is-managed-default -v false - - + + For any resource that has a value for is-managed, make sure it is set to false (so that the cluster will not stop it) - crm_resource -t primitive -r <rsc_id> -p is-managed -v false - - + crm_resource -t primitive -r <rsc_id> -p is-managed -v false + + On each node: - - - Shutdown the cluster stack (Heartbeat or Corosync) - - - Upgrade the cluster stack program - This may also include upgrading the underlying operating system. - - - - + + + Shutdown the cluster stack (Heartbeat or Corosync) + + + Upgrade the cluster stack program - This may also include upgrading the underlying operating system. + + + + Check the configuration manually or with the crm_verify tool if available. - - + + On each node: - - - Start the cluster stack. - This can be either Corosync or Heartbeat and does not need to be the same as the previous cluster stack. - - - - + + + Start the cluster stack. + This can be either Corosync or Heartbeat and does not need to be the same as the previous cluster stack. + + + + Verify that the cluster re-detected all resources correctly. - - + + Allow the cluster to resume managing resources again: crm_attribute -t crm_config -n is-managed-default -v true - - + + For any resource that has a value for is-managed reset it to true (so the cluster can recover the service if it fails) if desired: crm_resource -t primitive -r <rsc_id> -p is-managed -v false - - -
-
- Notes + + +
+
+ Notes - Always check your existing configuration is still compatible with the version you are installing before starting the cluster. - - + Always check your existing configuration is still compatible with the version you are installing before starting the cluster. + + - The oldest version of the CRM to support this upgrade type was in Heartbeat 2.0.4 - -
+ The oldest version of the CRM to support this upgrade type was in Heartbeat 2.0.4 + +
diff --git a/doc/Pacemaker_Explained/en-US/Book_Info.xml b/doc/Pacemaker_Explained/en-US/Book_Info.xml index 62ce0bead5..8255c99d68 100644 --- a/doc/Pacemaker_Explained/en-US/Book_Info.xml +++ b/doc/Pacemaker_Explained/en-US/Book_Info.xml @@ -1,37 +1,37 @@ Configuration Explained An A-Z guide to Pacemaker's Configuration Options Pacemaker 1.1 1 0 The purpose of this document is to definitively explain the concepts used to configure Pacemaker. To achieve this, it will focus exclusively on the XML syntax used to configure the CIB. For those that are allergic to XML, Pacemaker comes with a cluster shell; a Python based GUI exists, too, however these tools will not be covered at all in this document - I hope, however, that the concepts explained here make the functionality of these tools more easily understood. + I hope, however, that the concepts explained here make the functionality of these tools more easily understood. , precisely because they hide the XML. Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario. Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster. - + diff --git a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.xml b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.xml index 7915b8e09d..cecc112b04 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.xml @@ -1,545 +1,545 @@ Advanced Configuration
Connecting from a Remote Machine Remote connect Remote administration - Provided Pacemaker is installed on a machine, it is possible to connect to the cluster even if the machine itself is not in the same cluster. - To do this, one simply sets up a number of environment variables and runs the same commands as when working on a cluster node. + Provided Pacemaker is installed on a machine, it is possible to connect to the cluster even if the machine itself is not in the same cluster. + To do this, one simply sets up a number of environment variables and runs the same commands as when working on a cluster node. - Environment Variables Used to Connect to Remote Instances of the CIB - + Environment Variables Used to Connect to Remote Instances of the CIB + Environment VariableRemote Administration Environment Variable Description CIB_*, Env. Var. for Remote Conn.user Environment VariableCIB_user CIB_user The user to connect as. Needs to be part of the hacluster group on the target host. Defaults to $USER. - + CIB_*, Env. Var. for Remote Conn.passwd Environment VariableCIB_passwd CIB_passwd The user's password. Read from the command line if unset. CIB_*, Env. Var. for Remote Conn.server Environment VariableCIB_server CIB_server The host to contact. Defaults to localhost. CIB_*, Env. Var. for Remote Conn.port Environment VariableCIB_port CIB_port The port on which to contact the server; required. CIB_*, Env. Var. for Remote Conn.encrypted Environment VariableCIB_encrypted CIB_encrypted Encrypt network traffic; defaults to true. - - + +
- So, if c001n01 is an active cluster node and is listening on 1234 for connections, and someguy is a member of the hacluster group, - then the following would prompt for someguy's password and return the cluster's current configuration: + So, if c001n01 is an active cluster node and is listening on 1234 for connections, and someguy is a member of the hacluster group, + then the following would prompt for someguy's password and return the cluster's current configuration: export CIB_port=1234; export CIB_server=c001n01; export CIB_user=someguy; cibadmin -Q - For security reasons, the cluster does not listen for remote connections by default. - If you wish to allow remote access, you need to set the remote-tls-port (encrypted) or remote-clear-port (unencrypted) top-level options (ie., those kept in the cib tag, like num_updates and epoch). + For security reasons, the cluster does not listen for remote connections by default. + If you wish to allow remote access, you need to set the remote-tls-port (encrypted) or remote-clear-port (unencrypted) top-level options (ie., those kept in the cib tag, like num_updates and epoch). - - <indexterm significance="preferred"><primary>Remote</primary><secondary>connect, CIB options</secondary></indexterm> - Extra top-level CIB options for remote access - + + <indexterm significance="preferred"><primary>Remote</primary><secondary>connect, CIB options</secondary></indexterm> + Extra top-level CIB options for remote access + Field Description - remote-tls-port - remote-tls-port + remote-tls-port + remote-tls-port Listen for encrypted remote connections on this port. Default: none - remote-clear-port - remote-clear-port + remote-clear-port + remote-clear-port Listen for plaintext remote connections on this port. Default: none - - + +
Specifying When Recurring Actions are Performed - By default, recurring actions are scheduled relative to when the resource started. - So if your resource was last started at 14:32 and you have a backup set to be performed every 24 hours, then the backup will always run at in the middle of the business day - hardly desirable. + By default, recurring actions are scheduled relative to when the resource started. + So if your resource was last started at 14:32 and you have a backup set to be performed every 24 hours, then the backup will always run at in the middle of the business day - hardly desirable. - To specify a date/time that the operation should be relative to, set the operation's interval-origin. - The cluster uses this point to calculate the correct start-delay such that the operation will occur at origin + (interval * N). + To specify a date/time that the operation should be relative to, set the operation's interval-origin. + The cluster uses this point to calculate the correct start-delay such that the operation will occur at origin + (interval * N). - So, if the operation's interval is 24h, it's interval-origin is set to 02:00 and it is currently 14:32, then the cluster would initiate the operation with a start delay of 11 hours and 28 minutes. - If the resource is moved to another node before 2am, then the operation is of course cancelled. + So, if the operation's interval is 24h, it's interval-origin is set to 02:00 and it is currently 14:32, then the cluster would initiate the operation with a start delay of 11 hours and 28 minutes. + If the resource is moved to another node before 2am, then the operation is of course cancelled. - The value specified for interval and interval-origin can be any date/time conforming to the ISO8601 standard. - By way of example, to specify an operation that would run on the first Monday of 2009 and every Monday after that you would add: + The value specified for interval and interval-origin can be any date/time conforming to the ISO8601 standard. + By way of example, to specify an operation that would run on the first Monday of 2009 and every Monday after that you would add: - Specifying a Base for Recurring Action Intervals + Specifying a Base for Recurring Action Intervals <op id="my-weekly-action" name="custom-action" interval="P7D" interval-origin="2009-W01-1"/>
Moving Resources - Moving Resources - ResourceMoving + Moving Resources + ResourceMoving
- Manual Intervention - There are primarily two occasions when you would want to move a resource from it's current location: when the whole node is under maintenance, and when a single resource needs to be moved. - - Since everything eventually comes down to a score, you could create constraints for every resource to prevent them from running on one node. - While the configuration can seem convoluted at times, not even we would require this of administrators. - - - Instead one can set a special node attribute which tells the cluster "don't let anything run here". - There is even a helpful tool to help query and set it, called crm_standby. - To check the standby status of the current machine, simply run: - - crm_standby --get-value - - A value of true indicates that the node is NOT able to host any resources, while a value of false says that it CAN. - - - You can also check the status of other nodes in the cluster by specifying the --node-uname option: - - crm_standby --get-value --node-uname sles-2 - To change the current node's standby status, use --attr-value instead of --get-value. - crm_standby --attr-value - Again, you can change another host's value by supplying a host name with --node-uname. - - When only one resource is required to move, we do this by creating location constraints. - However, once again we provide a user friendly shortcut as part of the crm_resource command, which creates and modifies the extra constraints for you. - If Email was running on sles-1 and you wanted it moved to a specific location, the command would look something like: - - crm_resource -M -r Email -H sles-2 - Behind the scenes, the tool will create the following location constraint: + Manual Intervention + There are primarily two occasions when you would want to move a resource from it's current location: when the whole node is under maintenance, and when a single resource needs to be moved. + + Since everything eventually comes down to a score, you could create constraints for every resource to prevent them from running on one node. + While the configuration can seem convoluted at times, not even we would require this of administrators. + + + Instead one can set a special node attribute which tells the cluster "don't let anything run here". + There is even a helpful tool to help query and set it, called crm_standby. + To check the standby status of the current machine, simply run: + + crm_standby --get-value + + A value of true indicates that the node is NOT able to host any resources, while a value of false says that it CAN. + + + You can also check the status of other nodes in the cluster by specifying the --node-uname option: + + crm_standby --get-value --node-uname sles-2 + To change the current node's standby status, use --attr-value instead of --get-value. + crm_standby --attr-value + Again, you can change another host's value by supplying a host name with --node-uname. + + When only one resource is required to move, we do this by creating location constraints. + However, once again we provide a user friendly shortcut as part of the crm_resource command, which creates and modifies the extra constraints for you. + If Email was running on sles-1 and you wanted it moved to a specific location, the command would look something like: + + crm_resource -M -r Email -H sles-2 + Behind the scenes, the tool will create the following location constraint: <rsc_location rsc="Email" node="sles-2" score="INFINITY"/> - It is important to note that subsequent invocations of crm_resource -M are not cumulative. So, if you ran these commands - crm_resource -M -r Email -H sles-2 + It is important to note that subsequent invocations of crm_resource -M are not cumulative. So, if you ran these commands + crm_resource -M -r Email -H sles-2 crm_resource -M -r Email -H sles-3 - then it is as if you had never performed the first command. - To allow the resource to move back again, use: - crm_resource -U -r Email - - Note the use of the word allow. - The resource can move back to its original location but, depending on resource-stickiness, it might stay where it is. - To be absolutely certain that it moves back to sles-1, move it there before issuing the call to crm_resource -U: - - crm_resource -M -r Email -H sles-1 + then it is as if you had never performed the first command. + To allow the resource to move back again, use: + crm_resource -U -r Email + + Note the use of the word allow. + The resource can move back to its original location but, depending on resource-stickiness, it might stay where it is. + To be absolutely certain that it moves back to sles-1, move it there before issuing the call to crm_resource -U: + + crm_resource -M -r Email -H sles-1 crm_resource -U -r Email - Alternatively, if you only care that the resource should be moved from its current location, try - crm_resource -M -r Email - Which will instead create a negative constraint, like - <rsc_location rsc="Email" node="sles-1" score="-INFINITY"/> - - This will achieve the desired effect, but will also have long-term consequences. - As the tool will warn you, the creation of a -INFINITY constraint will prevent the resource from running on that node until crm_resource -U is used. - This includes the situation where every other cluster node is no longer available! - - - In some cases, such as when resource-stickiness is set to INFINITY, it is possible that you will end up with the problem described in . - The tool can detect some of these cases and deals with them by also creating both a positive and negative constraint. Eg. - + Alternatively, if you only care that the resource should be moved from its current location, try + crm_resource -M -r Email + Which will instead create a negative constraint, like + <rsc_location rsc="Email" node="sles-1" score="-INFINITY"/> + + This will achieve the desired effect, but will also have long-term consequences. + As the tool will warn you, the creation of a -INFINITY constraint will prevent the resource from running on that node until crm_resource -U is used. + This includes the situation where every other cluster node is no longer available! + + + In some cases, such as when resource-stickiness is set to INFINITY, it is possible that you will end up with the problem described in . + The tool can detect some of these cases and deals with them by also creating both a positive and negative constraint. Eg. + Email prefers sles-1 with a score of -INFINITY Email prefers sles-2 with a score of INFINITY - which has the same long-term consequences as discussed earlier. + which has the same long-term consequences as discussed earlier.
- Moving Resources Due to Failure - New in 1.0 is the concept of a migration threshold + Moving Resources Due to Failure + New in 1.0 is the concept of a migration threshold - The naming of this option was unfortunate as it is easily confused with true migration, the process of moving a resource from one node to another without stopping it. - Xen virtual guests are the most common example of resources that can be migrated in this manner. - - . - Simply define migration-threshold=N for a resource and it will migrate to a new node after N failures. - There is no threshold defined by default. - To determine the resource's current failure status and limits, use crm_mon --failcounts. - - - By default, once the threshold has been reached, this node will no longer be allowed to run the failed resource until the administrator manually resets the resource's failcount using crm_failcount (after hopefully first fixing the failure's cause). - However it is possible to expire them by setting the resource's failure-timeout option. - - So a setting of migration-threshold=2 and failure-timeout=60s would cause the resource to move to a new node after 2 failures, and allow it to move back (depending on the stickiness and constraint scores) after one minute. - - There are two exceptions to the migration threshold concept; they occur when a resource either fails to start or fails to stop. - Start failures cause the failcount to be set to INFINITY and thus always cause the resource to move immediately. - - - Stop failures are slightly different and crucial. - If a resource fails to stop and STONITH is enabled, then the cluster will fence the node in order to be able to start the resource elsewhere. - If STONITH is not enabled, then the cluster has no way to continue and will not try to start the resource elsewhere, but will try to stop it again after the failure timeout. - - Please read before enabling this option. + The naming of this option was unfortunate as it is easily confused with true migration, the process of moving a resource from one node to another without stopping it. + Xen virtual guests are the most common example of resources that can be migrated in this manner. + + . + Simply define migration-threshold=N for a resource and it will migrate to a new node after N failures. + There is no threshold defined by default. + To determine the resource's current failure status and limits, use crm_mon --failcounts. + + + By default, once the threshold has been reached, this node will no longer be allowed to run the failed resource until the administrator manually resets the resource's failcount using crm_failcount (after hopefully first fixing the failure's cause). + However it is possible to expire them by setting the resource's failure-timeout option. + + So a setting of migration-threshold=2 and failure-timeout=60s would cause the resource to move to a new node after 2 failures, and allow it to move back (depending on the stickiness and constraint scores) after one minute. + + There are two exceptions to the migration threshold concept; they occur when a resource either fails to start or fails to stop. + Start failures cause the failcount to be set to INFINITY and thus always cause the resource to move immediately. + + + Stop failures are slightly different and crucial. + If a resource fails to stop and STONITH is enabled, then the cluster will fence the node in order to be able to start the resource elsewhere. + If STONITH is not enabled, then the cluster has no way to continue and will not try to start the resource elsewhere, but will try to stop it again after the failure timeout. + + Please read before enabling this option.
- Moving Resources Due to Connectivity Changes - Setting up the cluster to move resources when external connectivity is lost is a two-step process. -
- Tell Pacemaker to monitor connectivity - - To do this, you need to add a ping resource to the cluster. - The ping resource uses the system utility of the same name to a test if list of machines (specified by DNS hostname or IPv4/IPv6 address) are reachable and uses the results to maintain a node attribute normally called pingd - The attribute name is customizable; that allows multiple ping groups to be defined. - . - - Older versions of Heartbeat required users to add ping nodes to ha.cf - this is no longer required. - - - - Older versions of Pacemaker used a custom binary called pingd for this functionality; this is now deprecated in favor of ping. - If your version of Pacemaker does not contain the ping agent, you can download the latest version. - + Moving Resources Due to Connectivity Changes + Setting up the cluster to move resources when external connectivity is lost is a two-step process. +
+ Tell Pacemaker to monitor connectivity + + To do this, you need to add a ping resource to the cluster. + The ping resource uses the system utility of the same name to a test if list of machines (specified by DNS hostname or IPv4/IPv6 address) are reachable and uses the results to maintain a node attribute normally called pingd + The attribute name is customizable; that allows multiple ping groups to be defined. + . + + Older versions of Heartbeat required users to add ping nodes to ha.cf - this is no longer required. + + + + Older versions of Pacemaker used a custom binary called pingd for this functionality; this is now deprecated in favor of ping. + If your version of Pacemaker does not contain the ping agent, you can download the latest version. + - - - Normally the resource will run on all cluster nodes, which means that you'll need to create a clone. - A template for this can be found below along with a description of the most interesting parameters. - - - Common Options for a 'ping' Resource - + + + Normally the resource will run on all cluster nodes, which means that you'll need to create a clone. + A template for this can be found below along with a description of the most interesting parameters. + +
+ Common Options for a 'ping' Resource + - - Field - Description - + + Field + Description + - - - + + + dampenResource Option ResourceOptiondampen - dampen - The time to wait (dampening) for further changes to occur. Use this to prevent a resource from bouncing around the cluster when cluster nodes notice the loss of connectivity at slightly different times. - - - + dampen + The time to wait (dampening) for further changes to occur. Use this to prevent a resource from bouncing around the cluster when cluster nodes notice the loss of connectivity at slightly different times. + + + multiplierResource Option ResourceOptionmultiplier - multiplier - The number of connected ping nodes gets multiplied by this value to get a score. Useful when there are multiple ping nodes configured. - - - + multiplier + The number of connected ping nodes gets multiplied by this value to get a score. Useful when there are multiple ping nodes configured. + + + host_listResource Option ResourceOptionhost_list - host_list - The machines to contact in order to determine the current connectivity status. Allowed values include resolvable DNS host names, IPv4 and IPv6 addresses. - - - -
- - An example ping cluster resource, checks node connectivity once every minute - + host_list + The machines to contact in order to determine the current connectivity status. Allowed values include resolvable DNS host names, IPv4 and IPv6 addresses. + + + + + + An example ping cluster resource, checks node connectivity once every minute + ]]> - - - - You're only half done. - The next section deals with telling Pacemaker how to deal with the connectivity status that ocf:pacemaker:ping is recording. - + + + + You're only half done. + The next section deals with telling Pacemaker how to deal with the connectivity status that ocf:pacemaker:ping is recording. + - -
-
- Tell Pacemaker how to interpret the connectivity data - NOTE: Before reading the following, please make sure you have read and understood above. - - There are a number of ways to use the connectivity data provided by Heartbeat. - The most common setup is for people to have a single ping node, to prevent the cluster from running a resource on any unconnected node. + +
+
+ Tell Pacemaker how to interpret the connectivity data + NOTE: Before reading the following, please make sure you have read and understood above. + + There are a number of ways to use the connectivity data provided by Heartbeat. + The most common setup is for people to have a single ping node, to prevent the cluster from running a resource on any unconnected node. TODO: is the idea that only nodes that can reach eg. the router should have active resources? - - - Don't run on unconnected nodes - + + + Don't run on unconnected nodes + ]]> - - - A more complex setup is to have a number of ping nodes configured. - You can require the cluster to only run resources on nodes that can connect to all (or a minimum subset) of them. - - - Run only on nodes connected to three or more ping nodes; this assumes <literal>multiplier</literal> is set to 1000. - + + + A more complex setup is to have a number of ping nodes configured. + You can require the cluster to only run resources on nodes that can connect to all (or a minimum subset) of them. + + + Run only on nodes connected to three or more ping nodes; this assumes <literal>multiplier</literal> is set to 1000. + ]]> - - - Instead you can tell the cluster only to prefer nodes with the best connectivity. - Just be sure to set multiplier to a value higher than that of resource-stickiness (and don't set either of them to INFINITY). - - - Prefer the node with the most connected ping nodes - + + + Instead you can tell the cluster only to prefer nodes with the best connectivity. + Just be sure to set multiplier to a value higher than that of resource-stickiness (and don't set either of them to INFINITY). + + + Prefer the node with the most connected ping nodes + ]]> - - - It is perhaps easier to think of this in terms of the simple constraints that the cluster translates it into. - For example, if sles-1 is connected to all 5 ping nodes but sles-2 is only connected to 2, then it would be as if you instead had the following constraints in your configuration: - -
- How the cluster translates the pingd constraint - + + + It is perhaps easier to think of this in terms of the simple constraints that the cluster translates it into. + For example, if sles-1 is connected to all 5 ping nodes but sles-2 is only connected to 2, then it would be as if you instead had the following constraints in your configuration: + +
+ How the cluster translates the pingd constraint + ]]> -
- The advantage is that you don't have to manually update any constraints whenever your network connectivity changes. - - You can also combine the concepts above into something even more complex. - The example below shows how you can prefer the node with the most connected ping nodes provided they have connectivity to at least three (again assuming that multiplier is set to 1000). - - - A more complex example of choosing a location based on connectivity - +
+ The advantage is that you don't have to manually update any constraints whenever your network connectivity changes. + + You can also combine the concepts above into something even more complex. + The example below shows how you can prefer the node with the most connected ping nodes provided they have connectivity to at least three (again assuming that multiplier is set to 1000). + + + A more complex example of choosing a location based on connectivity + ]]> - -
+ +
- Resource Migration - - Some resources, such as Xen virtual guests, are able to move to another location without loss of state. - We call this resource migration; this is different from the normal practice of stopping the resource on the first machine and starting it elsewhere. - - - Not all resources are able to migrate, see the Migration Checklist below, and those that can, won't do so in all situations. - Conceptually there are two requirements from which the other prerequisites follow: + Resource Migration + + Some resources, such as Xen virtual guests, are able to move to another location without loss of state. + We call this resource migration; this is different from the normal practice of stopping the resource on the first machine and starting it elsewhere. + + + Not all resources are able to migrate, see the Migration Checklist below, and those that can, won't do so in all situations. + Conceptually there are two requirements from which the other prerequisites follow: the resource must be active and healthy at the old location everything required for the resource to run must be available on both the old and new locations - - The cluster is able to accommodate both push and pull migration models by requiring the resource agent to support two new actions: migrate_to (performed on the current location) and migrate_from (performed on the destination). - - In push migration, the process on the current location transfers the resource to the new location where is it later activated. - In this scenario, most of the work would be done in the migrate_to action and, if anything, the activation would occur during migrate_from. - - Conversely for pull, the migrate_to action is practically empty and migrate_from does most of the work, extracting the relevant resource state from the old location and activating it. - There is no wrong or right way to implement migration for your service, as long as it works. -
- Migration Checklist - - The resource may not be a clone. - The resource must use an OCF style agent. - The resource must not be in a failed or degraded state. - The resource must not, directly or indirectly, depend on any primitive or group resources. TODO: how can a KVM with DRBD migrate? - The resource must support two new actions: migrate_to and migrate_from, and advertise them in its metadata. - The resource must have the allow-migrate meta-attribute set to true (which is not the default). - - - If the resource depends on a clone, and at the time the resource needs to be move, the clone has instances that are stopping and instances that are starting, then the resource will be moved in the traditional manner. - The Policy Engine is not yet able to model this situation correctly and so takes the safe (yet less optimal) path. - -
+
+ The cluster is able to accommodate both push and pull migration models by requiring the resource agent to support two new actions: migrate_to (performed on the current location) and migrate_from (performed on the destination). + + In push migration, the process on the current location transfers the resource to the new location where is it later activated. + In this scenario, most of the work would be done in the migrate_to action and, if anything, the activation would occur during migrate_from. + + Conversely for pull, the migrate_to action is practically empty and migrate_from does most of the work, extracting the relevant resource state from the old location and activating it. + There is no wrong or right way to implement migration for your service, as long as it works. +
+ Migration Checklist + + The resource may not be a clone. + The resource must use an OCF style agent. + The resource must not be in a failed or degraded state. + The resource must not, directly or indirectly, depend on any primitive or group resources. TODO: how can a KVM with DRBD migrate? + The resource must support two new actions: migrate_to and migrate_from, and advertise them in its metadata. + The resource must have the allow-migrate meta-attribute set to true (which is not the default). + + + If the resource depends on a clone, and at the time the resource needs to be move, the clone has instances that are stopping and instances that are starting, then the resource will be moved in the traditional manner. + The Policy Engine is not yet able to model this situation correctly and so takes the safe (yet less optimal) path. + +
Reusing Rules, Options and Sets of Operations - Sometimes a number of constraints need to use the same set of rules, and resources need to set the same options and parameters. - To simplify this situation, you can refer to an existing object using an id-ref instead of an id. + Sometimes a number of constraints need to use the same set of rules, and resources need to set the same options and parameters. + To simplify this situation, you can refer to an existing object using an id-ref instead of an id. So if for one resource you have ]]> Then instead of duplicating the rule for all your other resources, you can instead specify - Referencing rules from other constraints - + Referencing rules from other constraints + ]]> - - The cluster will insist that the rule exists somewhere. - Attempting to add a reference to a non-existing rule will cause a validation failure, as will attempting to remove a rule that is referenced elsewhere. - + + The cluster will insist that the rule exists somewhere. + Attempting to add a reference to a non-existing rule will cause a validation failure, as will attempting to remove a rule that is referenced elsewhere. + The same principle applies for meta_attributes and instance_attributes as illustrated in the example below - Referencing attributes, options, and operations from other resources - + Referencing attributes, options, and operations from other resources + ]]>
Reloading Services After a Definition Change - The cluster automatically detects changes to the definition of services it manages. - However, the normal response is to stop the service (using the old definition) and start it again (with the new definition). - This works well, but some services are smarter and can be told to use a new set of options without restarting. + The cluster automatically detects changes to the definition of services it manages. + However, the normal response is to stop the service (using the old definition) and start it again (with the new definition). + This works well, but some services are smarter and can be told to use a new set of options without restarting. - To take advantage of this capability, your resource agent must: - - - Accept the reload operation and perform any required actions. - The steps required here depend completely on your application! - - The DRBD Agent's Control logic for Supporting the <literal>reload</literal> Operation - + + Accept the reload operation and perform any required actions. + The steps required here depend completely on your application! + + The DRBD Agent's Control logic for Supporting the <literal>reload</literal> Operation + - - - - Advertise the reload operation in the actions section of its metadata - - The DRBD Agent Advertising Support for the <literal>reload</literal> Operation - + + + + Advertise the reload operation in the actions section of its metadata + + The DRBD Agent Advertising Support for the <literal>reload</literal> Operation + 1.1 Master/Slave OCF Resource Agent for DRBD ... ]]> - - - - Advertise one or more parameters that can take effect using reload. - Any parameter with the unique set to 0 is eligible to be used in this way. - - Parameter that can be changed using reload - + + + + Advertise one or more parameters that can take effect using reload. + Any parameter with the unique set to 0 is eligible to be used in this way. + + Parameter that can be changed using reload + Full path to the drbd.conf file. Path to drbd.conf ]]> - - - + + + - Once these requirements are satisfied, the cluster will automatically know to reload the resource (instead of restarting) when a non-unique fields changes. + Once these requirements are satisfied, the cluster will automatically know to reload the resource (instead of restarting) when a non-unique fields changes. - - The metadata is re-read when the resource is started. - This may mean that the resource will be restarted the first time, even though you changed a parameter with unique=0 - + + The metadata is re-read when the resource is started. + This may mean that the resource will be restarted the first time, even though you changed a parameter with unique=0 + - - If both a unique and non-unique field are changed simultaneously, the resource will still be restarted. - + + If both a unique and non-unique field are changed simultaneously, the resource will still be restarted. +
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.xml b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.xml index 0eda4ab228..b134b0df4f 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Advanced-Resources.xml @@ -1,1023 +1,1023 @@ Advanced Resource Types
<indexterm significance="preferred"><primary>Group Resources</primary></indexterm> <indexterm><primary>Resources</primary><secondary>Groups</secondary></indexterm> Groups - A Syntactic Shortcut - One of the most common elements of a cluster is a set of resources that need to be located together, start sequentially, and stop in the reverse order. - To simplify this configuration we support the concept of groups. + One of the most common elements of a cluster is a set of resources that need to be located together, start sequentially, and stop in the reverse order. + To simplify this configuration we support the concept of groups. - An example group - + An example group + ]]> - Although the example above contains only two resources, there is no limit to the number of resources a group can contain. - The example is also sufficient to explain the fundamental properties of a group: + Although the example above contains only two resources, there is no limit to the number of resources a group can contain. + The example is also sufficient to explain the fundamental properties of a group: - Resources are started in the order they appear in (Public-IP first, then Email) - Resources are stopped in the reverse order to which they appear in (Email first, then Public-IP) - - If a resource in the group can't run anywhere, then nothing after that is allowed to run, too. - - If Public-IP can't run anywhere, neither can Email; - but if Email can't run anywhere, this does not affect Public-IP in any way - - - + Resources are started in the order they appear in (Public-IP first, then Email) + Resources are stopped in the reverse order to which they appear in (Email first, then Public-IP) + + If a resource in the group can't run anywhere, then nothing after that is allowed to run, too. + + If Public-IP can't run anywhere, neither can Email; + but if Email can't run anywhere, this does not affect Public-IP in any way + + + The group above is logically equivalent to writing: - How the cluster sees a group resource - + How the cluster sees a group resource + ]]> Obviously as the group grows bigger, the reduced configuration effort can become significant. Another (typical) example of a group is a DRBD volume, the filesystem mount, an IP address, and an application that uses them.
- Properties - - Properties of a Group Resource - - - + Properties +
+ Properties of a Group Resource + + + - Field - Description + Field + Description - - + + idGroup Resource Property Group Resource Propertiesid ResourceGroup Propertyid id - Your name for the group + Your name for the group - - -
+ + +
- Options - Options inherited from simple resources: priority, target-role, is-managed + Options + Options inherited from simple resources: priority, target-role, is-managed
-
- Instance Attributes - Groups have no instance attributes, however any that are set here will be inherited by the group's children. -
-
- Contents - - Groups may only contain a collection of primitive cluster resources. - To refer to the child of a group resource, just use the child's id instead of the group's. - -
-
- Constraints - Although it is possible to reference the group's children in constraints, it is usually preferable to use the group's name instead. - - Example constraints involving groups - +
+ Instance Attributes + Groups have no instance attributes, however any that are set here will be inherited by the group's children. +
+
+ Contents + + Groups may only contain a collection of primitive cluster resources. + To refer to the child of a group resource, just use the child's id instead of the group's. + +
+
+ Constraints + Although it is possible to reference the group's children in constraints, it is usually preferable to use the group's name instead. + + Example constraints involving groups + ]]> - -
-
+ +
+
<indexterm><primary>resource-stickiness</primary><secondary>of a Group Resource</secondary></indexterm> Stickiness - Stickiness, the measure of how much a resource wants to stay where it is, is additive in groups. + Stickiness, the measure of how much a resource wants to stay where it is, is additive in groups. Every active resource of the group will contribute its stickiness value to the group's total. So if the default resource-stickiness is 100, and a group has seven members, five of which are active, then the group as a whole will prefer its current location with a score of 500. -
+
<indexterm significance="preferred"><primary>Clone Resources</primary></indexterm> <indexterm><primary>Resources</primary><secondary>Clones</secondary></indexterm> Clones - Resources That Get Active on Multiple Hosts - Clones were initially conceived as a convenient way to start N instances of an IP resource and have them distributed throughout the cluster for load balancing. - They have turned out to quite useful for a number of purposes including integrating with Red Hat's DLM, the fencing subsystem, and OCFS2. + Clones were initially conceived as a convenient way to start N instances of an IP resource and have them distributed throughout the cluster for load balancing. + They have turned out to quite useful for a number of purposes including integrating with Red Hat's DLM, the fencing subsystem, and OCFS2. You can clone any resource, provided the resource agent supports it. Three types of cloned resources exist: - Anonymous - Globally Unique - Stateful + Anonymous + Globally Unique + Stateful - Anonymous clones are the simplest type. - These resources behave completely identically everywhere they are running. - Because of this, there can only be one copy of an anonymous clone active per machine. + Anonymous clones are the simplest type. + These resources behave completely identically everywhere they are running. + Because of this, there can only be one copy of an anonymous clone active per machine. - Globally unique clones are distinct entities. - A copy of the clone running on one machine is not equivalent to another instance on another node. - Nor would any two copies on the same node be equivalent. + Globally unique clones are distinct entities. + A copy of the clone running on one machine is not equivalent to another instance on another node. + Nor would any two copies on the same node be equivalent. Stateful clones are covered later in . - An example clone - + An example clone + ]]>
- Properties - - Properties of a Clone Resource - - - + Properties +
+ Properties of a Clone Resource + + + - Field - Description + Field + Description idClone Resource Property Clone Resource Propertiesid ResourceClone Propertyid id - Your name for the clone + Your name for the clone - - -
+ + +
- Options - Options inherited from simple resources: priority, target-role, is-managed - - Clone specific configuration options - - - + Options + Options inherited from simple resources: priority, target-role, is-managed +
+ Clone specific configuration options + + + - Field - Description + Field + Description - - + + clone-max Clone Resource Property Clone Resource Propertiesclone-max ResourceClone Propertyclone-max clone-max - How many copies of the resource to start. Defaults to the number of nodes in the cluster. + How many copies of the resource to start. Defaults to the number of nodes in the cluster. clone-node-max Clone Resource Property Clone Resource Propertiesclone-node-max ResourceClone Propertyclone-node-max clone-node-max - How many copies of the resource can be started on a single node; default 1. + How many copies of the resource can be started on a single node; default 1. notify Clone Resource Property Clone Resource Propertiesnotify ResourceClone Propertynotify notify - When stopping or starting a copy of the clone, tell all the other copies beforehand and when the action was successful. Allowed values: false, true - + When stopping or starting a copy of the clone, tell all the other copies beforehand and when the action was successful. Allowed values: false, true + globally-unique Clone Resource Property Clone Resource Propertiesglobally-unique ResourceClone Propertyglobally-unique globally-unique - Does each copy of the clone perform a different function? Allowed values: false, true + Does each copy of the clone perform a different function? Allowed values: false, true ordered Clone Resource Property Clone Resource Propertiesordered ResourceClone Propertyordered ordered - Should the copies be started in series (instead of in parallel). Allowed values: false, true - + Should the copies be started in series (instead of in parallel). Allowed values: false, true + interleave Clone Resource Property Clone Resource Propertiesinterleave ResourceClone Propertyinterleave interleave - Changes the behavior of ordering constraints (between clones/masters) so that instances can start/stop as soon as their peer instance has (rather than waiting for every instance of the other clone has). Allowed values: false, true - + Changes the behavior of ordering constraints (between clones/masters) so that instances can start/stop as soon as their peer instance has (rather than waiting for every instance of the other clone has). Allowed values: false, true + - - -
+ + +
-
- Instance Attributes - Clones have no instance attributes; however, any that are set here will be inherited by the clone's children. -
-
- Contents - Clones must contain exactly one group or one regular resource. - - - You should never reference the name of a clone's child. - If you think you need to do this, you probably need to re-evaluate your design. - - - -
-
- Constraints - - In most cases, a clone will have a single copy on each active cluster node. - If this is not the case, you can indicate which nodes the cluster should preferentially assign copies to with resource location constraints. - These constraints are written no differently to those for regular resources except that the clone's id is used. - - - Ordering constraints behave slightly differently for clones. - In the example below, apache-stats will wait until all copies of the clone that need to be started have done so before being started itself. - Only if no copies can be started apache-stats will be prevented from being active. - Additionally, the clone will wait for apache-stats to be stopped before stopping the clone. - - - Colocation of a regular (or group) resource with a clone means that the resource can run on any machine with an active copy of the clone. - The cluster will choose a copy based on where the clone is running and the resource's own location preferences. - - - Colocation between clones is also possible. - In such cases, the set of allowed locations for the clone is limited to nodes on which the clone is (or will be) active. - Allocation is then performed as normally. - - - Example constraints involving clones - +
+ Instance Attributes + Clones have no instance attributes; however, any that are set here will be inherited by the clone's children. +
+
+ Contents + Clones must contain exactly one group or one regular resource. + + + You should never reference the name of a clone's child. + If you think you need to do this, you probably need to re-evaluate your design. + + + +
+
+ Constraints + + In most cases, a clone will have a single copy on each active cluster node. + If this is not the case, you can indicate which nodes the cluster should preferentially assign copies to with resource location constraints. + These constraints are written no differently to those for regular resources except that the clone's id is used. + + + Ordering constraints behave slightly differently for clones. + In the example below, apache-stats will wait until all copies of the clone that need to be started have done so before being started itself. + Only if no copies can be started apache-stats will be prevented from being active. + Additionally, the clone will wait for apache-stats to be stopped before stopping the clone. + + + Colocation of a regular (or group) resource with a clone means that the resource can run on any machine with an active copy of the clone. + The cluster will choose a copy based on where the clone is running and the resource's own location preferences. + + + Colocation between clones is also possible. + In such cases, the set of allowed locations for the clone is limited to nodes on which the clone is (or will be) active. + Allocation is then performed as normally. + + + Example constraints involving clones + ]]> - -
-
- Stickiness - + +
+
+ Stickiness + resource-stickinessof a Clone Resource - To achieve a stable allocation pattern, clones are slightly sticky by default. - If no value for resource-stickiness is provided, the clone will use a value of 1. - Being a small value, it causes minimal disturbance to the score calculations of other resources but is enough to prevent Pacemaker from needlessly moving copies around the cluster. - -
-
- Resource Agent Requirements - - Any resource can be used as an anonymous clone, as it requires no additional support from the resource agent. - Whether it makes sense to do so depends on your resource and its resource agent. - - - Globally unique clones do require some additional support in the resource agent. - In particular, it must only respond with ${OCF_SUCCESS} if the node has that exact instance active. - All other probes for instances of the clone should result in ${OCF_NOT_RUNNING}. - Unless of course they are failed, in which case they should return one of the other OCF error codes. - - Copies of a clone are identified by appending a colon and a numerical offset, eg. apache:2. - Resource agents can find out how many copies there are by examining the OCF_RESKEY_CRM_meta_clone_max environment variable and which copy it is by examining OCF_RESKEY_CRM_meta_clone. - - You should not make any assumptions (based on OCF_RESKEY_CRM_meta_clone) about which copies are active. - In particular, the list of active copies will not always be an unbroken sequence, nor always start at 0. - -
-
- Notifications - - Supporting notifications requires the notify action to be implemented. - Once supported, the notify action will be passed a number of extra variables which, when combined with additional context, can be used to calculate the current state of the cluster and what is about to happen to it. - - - Environment variables supplied with Clone notify actions - - - + To achieve a stable allocation pattern, clones are slightly sticky by default. + If no value for resource-stickiness is provided, the clone will use a value of 1. + Being a small value, it causes minimal disturbance to the score calculations of other resources but is enough to prevent Pacemaker from needlessly moving copies around the cluster. + + +
+ Resource Agent Requirements + + Any resource can be used as an anonymous clone, as it requires no additional support from the resource agent. + Whether it makes sense to do so depends on your resource and its resource agent. + + + Globally unique clones do require some additional support in the resource agent. + In particular, it must only respond with ${OCF_SUCCESS} if the node has that exact instance active. + All other probes for instances of the clone should result in ${OCF_NOT_RUNNING}. + Unless of course they are failed, in which case they should return one of the other OCF error codes. + + Copies of a clone are identified by appending a colon and a numerical offset, eg. apache:2. + Resource agents can find out how many copies there are by examining the OCF_RESKEY_CRM_meta_clone_max environment variable and which copy it is by examining OCF_RESKEY_CRM_meta_clone. + + You should not make any assumptions (based on OCF_RESKEY_CRM_meta_clone) about which copies are active. + In particular, the list of active copies will not always be an unbroken sequence, nor always start at 0. + +
+
+ Notifications + + Supporting notifications requires the notify action to be implemented. + Once supported, the notify action will be passed a number of extra variables which, when combined with additional context, can be used to calculate the current state of the cluster and what is about to happen to it. + +
+ Environment variables supplied with Clone notify actions + + + - - Variable - Description - + + Variable + Description + - - - Environment VariableOCF_RESKEY_CRM_meta_notify_type + + + Environment VariableOCF_RESKEY_CRM_meta_notify_type OCF_RESKEY_CRM_meta_notify_type OCF_RESKEY_CRM_meta_notify_type - Allowed values: pre, post - - - Environment VariableOCF_RESKEY_CRM_meta_notify_operation + Allowed values: pre, post + + + Environment VariableOCF_RESKEY_CRM_meta_notify_operation OCF_RESKEY_CRM_meta_notify_operation OCF_RESKEY_CRM_meta_notify_operation - Allowed values: start, stop - - - Environment VariableOCF_RESKEY_CRM_meta_notify_start_resource + Allowed values: start, stop + + + Environment VariableOCF_RESKEY_CRM_meta_notify_start_resource OCF_RESKEY_CRM_meta_notify_start_resource OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be started - - - Environment VariableOCF_RESKEY_CRM_meta_notify_stop_resource + Resources to be started + + + Environment VariableOCF_RESKEY_CRM_meta_notify_stop_resource OCF_RESKEY_CRM_meta_notify_stop_resource OCF_RESKEY_CRM_meta_notify_stop_resource - Resources to be stopped - - - Environment VariableOCF_RESKEY_CRM_meta_notify_active_resource + Resources to be stopped + + + Environment VariableOCF_RESKEY_CRM_meta_notify_active_resource OCF_RESKEY_CRM_meta_notify_active_resource OCF_RESKEY_CRM_meta_notify_active_resource - Resources that are running - - - Environment VariableOCF_RESKEY_CRM_meta_notify_inactive_resource + Resources that are running + + + Environment VariableOCF_RESKEY_CRM_meta_notify_inactive_resource OCF_RESKEY_CRM_meta_notify_inactive_resource OCF_RESKEY_CRM_meta_notify_inactive_resource - Resources that are not running - - - Environment VariableOCF_RESKEY_CRM_meta_notify_start_uname + Resources that are not running + + + Environment VariableOCF_RESKEY_CRM_meta_notify_start_uname OCF_RESKEY_CRM_meta_notify_start_uname OCF_RESKEY_CRM_meta_notify_start_uname - Nodes on which resources will be started - - - Environment VariableOCF_RESKEY_CRM_meta_notify_stop_uname + Nodes on which resources will be started + + + Environment VariableOCF_RESKEY_CRM_meta_notify_stop_uname OCF_RESKEY_CRM_meta_notify_stop_uname OCF_RESKEY_CRM_meta_notify_stop_uname - Nodes on which resources will be stopped - - - Environment VariableOCF_RESKEY_CRM_meta_notify_active_uname + Nodes on which resources will be stopped + + + Environment VariableOCF_RESKEY_CRM_meta_notify_active_uname OCF_RESKEY_CRM_meta_notify_active_uname OCF_RESKEY_CRM_meta_notify_active_uname - Nodes on which resources are running - - - Environment VariableOCF_RESKEY_CRM_meta_notify_inactive_uname + Nodes on which resources are running + + + Environment VariableOCF_RESKEY_CRM_meta_notify_inactive_uname OCF_RESKEY_CRM_meta_notify_inactive_uname OCF_RESKEY_CRM_meta_notify_inactive_uname - Nodes on which resources are not running - - - -
- The variables come in pairs, such as OCF_RESKEY_CRM_meta_notify_start_resource and OCF_RESKEY_CRM_meta_notify_start_uname and should be treated as an array of whitespace separated elements. - Thus in order to indicate that clone:0 will be started on sles-1, clone:2 will be started on sles-3, and clone:3 will be started on sles-2, the cluster would set - - Example notification variables - - OCF_RESKEY_CRM_meta_notify_start_resource="clone:0 clone:2 clone:3" - OCF_RESKEY_CRM_meta_notify_start_uname="sles-1 sles-3 sles-2" - - -
-
- Proper Interpretation of Notification Environment Variables - Pre-notification (stop): - - + Nodes on which resources are not running + + + + + The variables come in pairs, such as OCF_RESKEY_CRM_meta_notify_start_resource and OCF_RESKEY_CRM_meta_notify_start_uname and should be treated as an array of whitespace separated elements. + Thus in order to indicate that clone:0 will be started on sles-1, clone:2 will be started on sles-3, and clone:3 will be started on sles-2, the cluster would set + + Example notification variables + + OCF_RESKEY_CRM_meta_notify_start_resource="clone:0 clone:2 clone:3" + OCF_RESKEY_CRM_meta_notify_start_uname="sles-1 sles-3 sles-2" + + +
+
+ Proper Interpretation of Notification Environment Variables + Pre-notification (stop): + + Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource - - + + Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource - - + + Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource - - + + Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - - - Post-notification (stop) / Pre-notification (start): + + + Post-notification (stop) / Pre-notification (start): Active resources $OCF_RESKEY_CRM_meta_notify_active_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource Inactive resources $OCF_RESKEY_CRM_meta_notify_inactive_resource plus $OCF_RESKEY_CRM_meta_notify_stop_resource Resources that were started: $OCF_RESKEY_CRM_meta_notify_start_resource Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource Post-notification (start): Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource plus $OCF_RESKEY_CRM_meta_notify_start_resource Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource plus $OCF_RESKEY_CRM_meta_notify_stop_resource minus $OCF_RESKEY_CRM_meta_notify_start_resource - + Resources that were started: $OCF_RESKEY_CRM_meta_notify_start_resource Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource -
+
<indexterm significance="preferred"><primary>Multi-state Resources</primary></indexterm> <indexterm significance="preferred"><primary>Resources</primary><secondary>Multi-state</secondary></indexterm> Multi-state - Resources That Have Multiple Modes - Multi-state resources are a specialization of Clone resources; please ensure you understand the section on clones before continuing! They allow the instances to be in one of two operating modes; - these are called Master and Slave, but can mean whatever you wish them to mean. - The only limitation is that when an instance is started, it must come up in the Slave state. + Multi-state resources are a specialization of Clone resources; please ensure you understand the section on clones before continuing! They allow the instances to be in one of two operating modes; + these are called Master and Slave, but can mean whatever you wish them to mean. + The only limitation is that when an instance is started, it must come up in the Slave state.
- Properties - - Properties of a Multi-State Resource - - - + Properties +
+ Properties of a Multi-State Resource + + + - Field - Description + Field + Description idMulti-State Resource Property Multi-State Resource Propertiesid ResourceMulti-State Propertyid id - Your name for the multi-state resource + Your name for the multi-state resource - - -
+ + +
- Options - Options inherited from simple resources: priority, target-role, is-managed - Options inherited from clone resources: clone-max, clone-node-max, notify, globally-unique, ordered, interleave - - Multi-state specific resource configuration options - - - + Options + Options inherited from simple resources: priority, target-role, is-managed + Options inherited from clone resources: clone-max, clone-node-max, notify, globally-unique, ordered, interleave +
+ Multi-state specific resource configuration options + + + - Field - Description + Field + Description master-max Multi-State Resource Property Multi-State Resource Propertiesmaster-max ResourceMulti-State Propertymaster-max master-max - How many copies of the resource can be promoted to master status; default 1. + How many copies of the resource can be promoted to master status; default 1. master-node-max Multi-State Resource Property Multi-State Resource Propertiesmaster-node-max ResourceMulti-State Propertymaster-node-max master-node-max - How many copies of the resource can be promoted to master status on a single node; default 1. + How many copies of the resource can be promoted to master status on a single node; default 1. -
-
-
- Instance Attributes - Multi-state resources have no instance attributes; however, any that are set here will be inherited by master's children. -
-
- Contents - Masters must contain exactly one group or one regular resource. - - - You should never reference the name of a master's child. - If you think you need to do this, you probably need to re-evaluate your design. - - + +
+
+ Instance Attributes + Multi-state resources have no instance attributes; however, any that are set here will be inherited by master's children. +
+
+ Contents + Masters must contain exactly one group or one regular resource. + + + You should never reference the name of a master's child. + If you think you need to do this, you probably need to re-evaluate your design. + + -
-
- Monitoring Multi-State Resources - - The normal type of monitor actions are not sufficient to monitor a multi-state resource in the Master state. - To detect failures of the Master instance, you need to define an additional monitor action with role="Master". - +
+
+ Monitoring Multi-State Resources + + The normal type of monitor actions are not sufficient to monitor a multi-state resource in the Master state. + To detect failures of the Master instance, you need to define an additional monitor action with role="Master". + It is crucial that every monitor operation has a different interval! This is because Pacemaker currently differentiates between operations only by resource and interval; so if eg. a master/slave resource has the same monitor interval for both roles, Pacemaker would ignore the role when checking the status - which would cause unexpected return codes, and therefore unnecessary complications. - - Monitoring both states of a multi-state resource - + + Monitoring both states of a multi-state resource + ]]> - -
-
- Constraints - - In most cases, a multi-state resources will have a single copy on each active cluster node. - If this is not the case, you can indicate which nodes the cluster should preferentially assign copies to with resource location constraints. - These constraints are written no differently to those for regular resources except that the master's id is used. - - - When considering multi-state resources in constraints, for most purposes it is sufficient to treat them as clones. - The exception is when the rsc-role and/or with-rsc-role fields (for colocation constraints) and first-action and/or then-action fields (for ordering constraints) are used. - - - Additional constraint options relevant to multi-state resources - + + +
+ Constraints + + In most cases, a multi-state resources will have a single copy on each active cluster node. + If this is not the case, you can indicate which nodes the cluster should preferentially assign copies to with resource location constraints. + These constraints are written no differently to those for regular resources except that the master's id is used. + + + When considering multi-state resources in constraints, for most purposes it is sufficient to treat them as clones. + The exception is when the rsc-role and/or with-rsc-role fields (for colocation constraints) and first-action and/or then-action fields (for ordering constraints) are used. + +
+ Additional constraint options relevant to multi-state resources + - - Field - Description - + + Field + Description + rsc-role Multi-State Resource Constraints Multi-State Resource Constraintsrsc-role ResourceMulti-State Constraintsrsc-role rsc-role - - An additional attribute of colocation constraints that specifies the role that rsc must be in. - Allowed values: Started, Master, Slave. - - - + + An additional attribute of colocation constraints that specifies the role that rsc must be in. + Allowed values: Started, Master, Slave. + + + with-rsc-role Multi-State Resource Constraints Multi-State Resource Constraintswith-rsc-role ResourceMulti-State Constraintswith-rsc-role with-rsc-role - - An additional attribute of colocation constraints that specifies the role that with-rsc must be in. - Allowed values: Started, Master, Slave. - - - + + An additional attribute of colocation constraints that specifies the role that with-rsc must be in. + Allowed values: Started, Master, Slave. + + + first-action Multi-State Resource Constraints Multi-State Resource Constraintsfirst-action ResourceMulti-State Constraintsfirst-action first-action - - An additional attribute of ordering constraints that specifies the action that the first resource must complete before executing the specified action for the then resource. - Allowed values: start, stop, promote, demote. - - - + + An additional attribute of ordering constraints that specifies the action that the first resource must complete before executing the specified action for the then resource. + Allowed values: start, stop, promote, demote. + + + then-action Multi-State Resource Constraints Multi-State Resource Constraintsthen-action ResourceMulti-State Constraintsthen-action then-action - - An additional attribute of ordering constraints that specifies the action that the then resource can only execute after the first-action on the first resource has completed. - Allowed values: start, stop, promote, demote. Defaults to the value (specified or implied) of first-action. - - - - -
- - In the example below, myApp will wait until one of the database copies has been started and promoted to master before being started itself. - Only if no copies can be promoted will apache-stats be prevented from being active. - Additionally, the database will wait for myApp to be stopped before it is demoted. - - - Example constraints involving multi-state resources - + + An additional attribute of ordering constraints that specifies the action that the then resource can only execute after the first-action on the first resource has completed. + Allowed values: start, stop, promote, demote. Defaults to the value (specified or implied) of first-action. + + + + + + + In the example below, myApp will wait until one of the database copies has been started and promoted to master before being started itself. + Only if no copies can be promoted will apache-stats be prevented from being active. + Additionally, the database will wait for myApp to be stopped before it is demoted. + + + Example constraints involving multi-state resources + ]]> - - - Colocation of a regular (or group) resource with a multi-state resource means that it can run on any machine with an active copy of the multi-state resource that is in the specified state (Master or Slave). - In the example, the cluster will choose a location based on where database is running as a Master, and if there are multiple Master instances it will also factor in myApp's own location preferences when deciding which location to choose. - - - Colocation with regular clones and other multi-state resources is also possible. - In such cases, the set of allowed locations for the rsc clone is (after role filtering) limited to nodes on which the with-rsc multi-state resource is (or will be) in the specified role. - Allocation is then performed as-per-normal. - -
-
- Stickiness - + + + Colocation of a regular (or group) resource with a multi-state resource means that it can run on any machine with an active copy of the multi-state resource that is in the specified state (Master or Slave). + In the example, the cluster will choose a location based on where database is running as a Master, and if there are multiple Master instances it will also factor in myApp's own location preferences when deciding which location to choose. + + + Colocation with regular clones and other multi-state resources is also possible. + In such cases, the set of allowed locations for the rsc clone is (after role filtering) limited to nodes on which the with-rsc multi-state resource is (or will be) in the specified role. + Allocation is then performed as-per-normal. + +
+
+ Stickiness + resource-stickinessof a Multi-State Resource - To achieve a stable allocation pattern, multi-state resources are slightly sticky by default. - If no value for resource-stickiness is provided, the multi-state resource will use a value of 1. - Being a small value, it causes minimal disturbance to the score calculations of other resources but is enough to prevent Pacemaker from needlessly moving copies around the cluster. - -
-
- Which Resource Instance is Promoted - - During the start operation, most Resource Agent scripts should call the crm_master utility. - This tool automatically detects both the resource and host and should be used to set a preference for being promoted. - Based on this, master-max, and master-node-max, the instance(s) with the highest preference will be promoted. - - The other alternative is to create a location constraint that indicates which nodes are most preferred as masters. - - Manually specifying which node should be promoted - + To achieve a stable allocation pattern, multi-state resources are slightly sticky by default. + If no value for resource-stickiness is provided, the multi-state resource will use a value of 1. + Being a small value, it causes minimal disturbance to the score calculations of other resources but is enough to prevent Pacemaker from needlessly moving copies around the cluster. + +
+
+ Which Resource Instance is Promoted + + During the start operation, most Resource Agent scripts should call the crm_master utility. + This tool automatically detects both the resource and host and should be used to set a preference for being promoted. + Based on this, master-max, and master-node-max, the instance(s) with the highest preference will be promoted. + + The other alternative is to create a location constraint that indicates which nodes are most preferred as masters. + + Manually specifying which node should be promoted + ]]> - -
-
- Resource Agent Requirements - - Since multi-state resources are an extension of cloned resources, all the requirements of Clones are also requirements of multi-state resources. - Additionally, multi-state resources require two extra actions: demote and promote; - these actions are responsible for changing the state of the resource. - Like start and stop, they should return OCF_SUCCESS if they completed successfully or a relevant error code if they did not. - - - The states can mean whatever you wish, but when the resource is started, it must come up in the mode called Slave. - From there the cluster will then decide which instances to promote to Master. - - - In addition to the Clone requirements for monitor actions, agents must also accurately report which state they are in. - The cluster relies on the agent to report its status (including role) accurately and does not indicate to the agent what role it currently believes it to be in. - - - Role implications of OCF return codes - + + +
+ Resource Agent Requirements + + Since multi-state resources are an extension of cloned resources, all the requirements of Clones are also requirements of multi-state resources. + Additionally, multi-state resources require two extra actions: demote and promote; + these actions are responsible for changing the state of the resource. + Like start and stop, they should return OCF_SUCCESS if they completed successfully or a relevant error code if they did not. + + + The states can mean whatever you wish, but when the resource is started, it must come up in the mode called Slave. + From there the cluster will then decide which instances to promote to Master. + + + In addition to the Clone requirements for monitor actions, agents must also accurately report which state they are in. + The cluster relies on the agent to report its status (including role) accurately and does not indicate to the agent what role it currently believes it to be in. + +
+ Role implications of OCF return codes + - - Monitor Return Code - Description - + + Monitor Return Code + Description + - return codeOCF_NOT_RUNNING + return codeOCF_NOT_RUNNING Environment VariableOCF_NOT_RUNNING OCF_NOT_RUNNING OCF_NOT_RUNNING - Stopped - - - return codeOCF_SUCCESS + Stopped + + + return codeOCF_SUCCESS Environment VariableOCF_SUCCESS OCF_SUCCESS OCF_SUCCESS - Running (Slave) - - - return codeOCF_RUNNING_MASTER + Running (Slave) + + + return codeOCF_RUNNING_MASTER Environment VariableOCF_RUNNING_MASTER OCF_RUNNING_MASTER OCF_RUNNING_MASTER - Running (Master) - - - return codeOCF_FAILED_MASTER + Running (Master) + + + return codeOCF_FAILED_MASTER Environment VariableOCF_FAILED_MASTER OCF_FAILED_MASTER OCF_FAILED_MASTER - Failed (Master) - - - Other - Failed (Slave) + Failed (Master) + + + Other + Failed (Slave) -
-
-
- Notifications - - Like clones, supporting notifications requires the notify action to be implemented. - Once supported the notify action will be passed a number of extra variables which, when combined with additional context, can be used to calculate the current state of the cluster and what is about to happen to it. - - - Environment variables supplied with <literal>Master</literal> notify actions<footnote><para>Emphasized variables are specific to <literal>Master</literal> resources and all behave in the same manner as described for Clone resources.</para></footnote> - - +
+
+
+ Notifications + + Like clones, supporting notifications requires the notify action to be implemented. + Once supported the notify action will be passed a number of extra variables which, when combined with additional context, can be used to calculate the current state of the cluster and what is about to happen to it. + + + Environment variables supplied with <literal>Master</literal> notify actions<footnote><para>Emphasized variables are specific to <literal>Master</literal> resources and all behave in the same manner as described for Clone resources.</para></footnote> + + - - Variable - Description - + + Variable + Description + Environment VariableOCF_RESKEY_CRM__meta_notify_type OCF_RESKEY_CRM_meta_notify_type OCF_RESKEY_CRM_meta_notify_type - Allowed values: pre, post - - + Allowed values: pre, post + + Environment VariableOCF_RESKEY_CRM__meta_notify_operation OCF_RESKEY_CRM_meta_notify_operationOCF_RESKEY_CRM_meta_notify_operation - Allowed values: start, stop - - + Allowed values: start, stop + + Environment VariableOCF_RESKEY_CRM__meta_notify_active_resource OCF_RESKEY_CRM_meta_notify_active_resource OCF_RESKEY_CRM_meta_notify_active_resource - Resources the that are running - - + Resources the that are running + + Environment VariableOCF_RESKEY_CRM__meta_notify_inactive_resource OCF_RESKEY_CRM_meta_notify_inactive_resource OCF_RESKEY_CRM_meta_notify_inactive_resource - Resources the that are not running - - + Resources the that are not running + + Environment VariableOCF_RESKEY_CRM__meta_notify_master_resource OCF_RESKEY_CRM_meta_notify_master_resource OCF_RESKEY_CRM_meta_notify_master_resource - Resources that are running in Master mode - - + Resources that are running in Master mode + + Environment VariableOCF_RESKEY_CRM__meta_notify_slave_resource OCF_RESKEY_CRM_meta_notify_slave_resource OCF_RESKEY_CRM_meta_notify_slave_resource - Resources that are running in Slave mode - - + Resources that are running in Slave mode + + Environment VariableOCF_RESKEY_CRM__meta_notify_start_resource OCF_RESKEY_CRM_meta_notify_start_resource OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be started - - + Resources to be started + + Environment VariableOCF_RESKEY_CRM__meta_notify_stop_resource OCF_RESKEY_CRM_meta_notify_stop_resource OCF_RESKEY_CRM_meta_notify_stop_resource - Resources to be stopped - - + Resources to be stopped + + Environment VariableOCF_RESKEY_CRM__meta_notify_promote_resource OCF_RESKEY_CRM_meta_notify_promote_resource OCF_RESKEY_CRM_meta_notify_promote_resource - Resources to be promoted - - + Resources to be promoted + + Environment VariableOCF_RESKEY_CRM__meta_notify_demote_resource OCF_RESKEY_CRM_meta_notify_demote_resource OCF_RESKEY_CRM_meta_notify_demote_resource - Resources to be demoted - - + Resources to be demoted + + Environment VariableOCF_RESKEY_CRM__meta_notify_start_uname OCF_RESKEY_CRM_meta_notify_start_uname OCF_RESKEY_CRM_meta_notify_start_uname - Nodes on which resources will be started - - + Nodes on which resources will be started + + Environment VariableOCF_RESKEY_CRM__meta_notify_stop_uname OCF_RESKEY_CRM_meta_notify_stop_uname OCF_RESKEY_CRM_meta_notify_stop_uname - Nodes on which resources will be stopped - - + Nodes on which resources will be stopped + + Environment VariableOCF_RESKEY_CRM__meta_notify_promote_uname OCF_RESKEY_CRM_meta_notify_promote_uname OCF_RESKEY_CRM_meta_notify_promote_uname - Nodes on which resources will be promoted - - + Nodes on which resources will be promoted + + Environment VariableOCF_RESKEY_CRM__meta_notify_demote_uname OCF_RESKEY_CRM_meta_notify_demote_uname OCF_RESKEY_CRM_meta_notify_demote_uname - Nodes on which resources will be demoted - - + Nodes on which resources will be demoted + + Environment VariableOCF_RESKEY_CRM__meta_notify_active_uname OCF_RESKEY_CRM_meta_notify_active_uname OCF_RESKEY_CRM_meta_notify_active_uname - Nodes on which resources are running - - + Nodes on which resources are running + + Environment VariableOCF_RESKEY_CRM__meta_notify_inactive_uname OCF_RESKEY_CRM_meta_notify_inactive_uname OCF_RESKEY_CRM_meta_notify_inactive_uname - Nodes on which resources are not running - - + Nodes on which resources are not running + + Environment VariableOCF_RESKEY_CRM__meta_notify_master_uname OCF_RESKEY_CRM_meta_notify_master_uname OCF_RESKEY_CRM_meta_notify_master_uname - Nodes on which resources are running in Master mode - - + Nodes on which resources are running in Master mode + + Environment VariableOCF_RESKEY_CRM__meta_notify_slave_uname OCF_RESKEY_CRM_meta_notify_slave_uname OCF_RESKEY_CRM_meta_notify_slave_uname - Nodes on which resources are running in Slave mode + Nodes on which resources are running in Slave mode -
-
-
- Proper Interpretation of Notification Environment Variables - Pre-notification (demote): - - Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource - Master resources: $OCF_RESKEY_CRM_meta_notify_master_resource - Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource - Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource - Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource - Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - + +
+
+ Proper Interpretation of Notification Environment Variables + Pre-notification (demote): + + Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource + Master resources: $OCF_RESKEY_CRM_meta_notify_master_resource + Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource + Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource + Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource + Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource + Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource + - Post-notification (demote) / Pre-notification (stop): + Post-notification (demote) / Pre-notification (stop): Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource Master resources: $OCF_RESKEY_CRM_meta_notify_master_resource minus $OCF_RESKEY_CRM_meta_notify_demote_resource - Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource - Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource - Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource - Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - - - Post-notification (stop) / Pre-notification (start) - + Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource + Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource + Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource + Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource + Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource + Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + + + Post-notification (stop) / Pre-notification (start) + Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource - Master resources: + Master resources: $OCF_RESKEY_CRM_meta_notify_master_resource minus $OCF_RESKEY_CRM_meta_notify_demote_resource - Slave resources: + Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource plus $OCF_RESKEY_CRM_meta_notify_stop_resource - Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource - Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource + Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource + Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource + Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource + Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - Post-notification (start) / Pre-notification (promote) - - Active resources: + Post-notification (start) / Pre-notification (promote) + + Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource plus $OCF_RESKEY_CRM_meta_notify_start_resource Master resources: $OCF_RESKEY_CRM_meta_notify_master_resource minus $OCF_RESKEY_CRM_meta_notify_demote_resource Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource plus $OCF_RESKEY_CRM_meta_notify_start_resource Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource plus $OCF_RESKEY_CRM_meta_notify_stop_resource minus $OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource - Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource - Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - Resources that were started: $OCF_RESKEY_CRM_meta_notify_start_resource - Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource - Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource + Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource + Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource + Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource + Resources that were started: $OCF_RESKEY_CRM_meta_notify_start_resource + Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource + Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource - - Post-notification (promote) + + Post-notification (promote) Active resources: $OCF_RESKEY_CRM_meta_notify_active_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource plus $OCF_RESKEY_CRM_meta_notify_start_resource Master resources: $OCF_RESKEY_CRM_meta_notify_master_resource minus $OCF_RESKEY_CRM_meta_notify_demote_resource plus $OCF_RESKEY_CRM_meta_notify_promote_resource Slave resources: $OCF_RESKEY_CRM_meta_notify_slave_resource minus $OCF_RESKEY_CRM_meta_notify_stop_resource plus $OCF_RESKEY_CRM_meta_notify_start_resource minus $OCF_RESKEY_CRM_meta_notify_promote_resource Inactive resources: $OCF_RESKEY_CRM_meta_notify_inactive_resource plus $OCF_RESKEY_CRM_meta_notify_stop_resource minus $OCF_RESKEY_CRM_meta_notify_start_resource Resources to be started: $OCF_RESKEY_CRM_meta_notify_start_resource Resources to be promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource Resources to be demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource Resources to be stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource Resources that were started: $OCF_RESKEY_CRM_meta_notify_start_resource Resources that were promoted: $OCF_RESKEY_CRM_meta_notify_promote_resource Resources that were demoted: $OCF_RESKEY_CRM_meta_notify_demote_resource Resources that were stopped: $OCF_RESKEY_CRM_meta_notify_stop_resource -
+
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Constraints.xml b/doc/Pacemaker_Explained/en-US/Ch-Constraints.xml index 0babe3113b..49c51e501f 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Constraints.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Constraints.xml @@ -1,508 +1,510 @@ Resource Constraints
Scores ResourceConstraints Constraintsfor Resources - Scores of all kinds are integral to how the cluster works. - Practically everything from moving a resource to deciding which resource to stop in a degraded cluster is achieved by manipulating scores in some way. + Scores of all kinds are integral to how the cluster works. + Practically everything from moving a resource to deciding which resource to stop in a degraded cluster is achieved by manipulating scores in some way. - Scores are calculated on a per-resource basis and any node with a negative score for a resource can't run that resource. - After calculating the scores for a resource, the cluster then chooses the node with the highest one. + Scores are calculated on a per-resource basis and any node with a negative score for a resource can't run that resource. + After calculating the scores for a resource, the cluster then chooses the node with the highest one.
- Infinity Math - INFINITY is currently defined as 1,000,000 and addition/subtraction with it follows these three basic rules: - - Any value + INFINITY = INFINITY - Any value - INFINITY = -INFINITY - INFINITY - INFINITY = -INFINITY - + Infinity Math + INFINITY is currently defined as 1,000,000 and addition/subtraction with it follows these three basic rules: + + Any value + INFINITY = INFINITY + Any value - INFINITY = -INFINITY + INFINITY - INFINITY = -INFINITY +
Deciding Which Nodes a Resource Can Run On - There are two alternative strategies for specifying which nodes a resources can run on. - One way is to say that by default they can run anywhere and then create location constraints for nodes that are not allowed. - The other option is to have nodes "opt-in"... - to start with nothing able to run anywhere and selectively enable allowed nodes. + There are two alternative strategies for specifying which nodes a resources can run on. + One way is to say that by default they can run anywhere and then create location constraints for nodes that are not allowed. + The other option is to have nodes "opt-in"... + to start with nothing able to run anywhere and selectively enable allowed nodes.
- Options - - Options for Simple Location Constraints - - - + Options +
+ Options for Simple Location Constraints + + + - Field - Description + Field + Description - - idConstraint Field - Constraint Fieldid - entry>id - A unique name for the constraint + + + + idConstraint Field + Constraint Fieldid + id + A unique name for the constraint rsc Constraint Field Constraint Fieldrsc rsc - A resource name + A resource name NodeConstraint Field Constraint Fieldnode node - A node's uname + A node's uname scoreConstraint Field Constraint Fieldscore score - Positive values indicate the resource should run on this node. Negative values indicate the resource should not run on this node. Values of +/- INFINITY change "should"/"should not" to "must"/"must not". + Positive values indicate the resource should run on this node. Negative values indicate the resource should not run on this node. Values of +/- INFINITY change "should"/"should not" to "must"/"must not". - - -
+ + +
<indexterm significance="preferred"><primary>Asymmetrical Opt-In Clusters</primary></indexterm> <indexterm significance="preferred"><primary>Cluster Type</primary><secondary>Asymmetrical Opt-In</secondary></indexterm> Asymmetrical "Opt-In" Clusters - To create an opt-in cluster, start by preventing resources from running anywhere by default: - crm_attribute --attr-name symmetric-cluster --attr-value false - - Then start enabling nodes. - The following fragment says that the web server prefers sles-1, the database prefers sles-2 and both can fail over to sles-3 if their most preferred node fails. - - - Example set of opt-in location constraints - + To create an opt-in cluster, start by preventing resources from running anywhere by default: + crm_attribute --attr-name symmetric-cluster --attr-value false + + Then start enabling nodes. + The following fragment says that the web server prefers sles-1, the database prefers sles-2 and both can fail over to sles-3 if their most preferred node fails. + + + Example set of opt-in location constraints + ]]> - +
<indexterm significance="preferred"><primary>Symmetrical Opt-Out Clusters</primary></indexterm> <indexterm significance="preferred"><primary>Cluster Type</primary><secondary>Symmetrical Opt-Out</secondary></indexterm> Symmetrical "Opt-Out" Clusters - To create an opt-out cluster, start by allowing resources to run anywhere by default - crm_attribute --attr-name symmetric-cluster --attr-value true - - Then start disabling nodes. - The following fragment is the equivalent of the above opt-in configuration. - - - Example set of opt-out location constraints - + To create an opt-out cluster, start by allowing resources to run anywhere by default + crm_attribute --attr-name symmetric-cluster --attr-value true + + Then start disabling nodes. + The following fragment is the equivalent of the above opt-in configuration. + + + Example set of opt-out location constraints + ]]> - - - Whether you should choose opt-in or opt-out depends both on your personal preference and the make-up of your cluster. - If most of your resources can run on most of the nodes, then an opt-out arrangement is likely to result in a simpler configuration. - On the other-hand, if most resources can only run on a small subset of nodes an opt-in configuration might be simpler. - + + + Whether you should choose opt-in or opt-out depends both on your personal preference and the make-up of your cluster. + If most of your resources can run on most of the nodes, then an opt-out arrangement is likely to result in a simpler configuration. + On the other-hand, if most resources can only run on a small subset of nodes an opt-in configuration might be simpler. +
- What if Two Nodes Have the Same Score - - If two nodes have the same score, then the cluster will choose one. - This choice may seem random and may not be what was intended, however the cluster was not given enough information to know any better. - - - Example of two resources that prefer two nodes equally - + What if Two Nodes Have the Same Score + + If two nodes have the same score, then the cluster will choose one. + This choice may seem random and may not be what was intended, however the cluster was not given enough information to know any better. + + + Example of two resources that prefer two nodes equally + ]]> - - - In the example above, assuming no other constraints and an inactive cluster, Webserver would probably be placed on sles-1 and Database on sles-2. - It would likely have placed Webserver based on the node's uname and Database based on the desire to spread the resource load evenly across the cluster. - However other factors can also be involved in more complex configurations. - + + + In the example above, assuming no other constraints and an inactive cluster, Webserver would probably be placed on sles-1 and Database on sles-2. + It would likely have placed Webserver based on the node's uname and Database based on the desire to spread the resource load evenly across the cluster. + However other factors can also be involved in more complex configurations. +
Specifying in which Order Resources Should Start/Stop The way to specify the order in which resources should start is by creating rsc_order constraints. - Properties of an Ordering Constraint - - - + Properties of an Ordering Constraint + + + - Field - Description + Field + Description - - - id - A unique name for the constraint + + + id + A unique name for the constraint - first - The name of a resource that must be started before the then resource is allowed to. + first + The name of a resource that must be started before the then resource is allowed to. - then - The name of a resource. This resource will start after the first resource. + then + The name of a resource. This resource will start after the first resource. - score - If greater than zero, the constraint is mandatory. Otherwise it is only a suggestion. Default value: INFINITY - + score + If greater than zero, the constraint is mandatory. Otherwise it is only a suggestion. Default value: INFINITY + - symmetrical - If true, which is the default, stop the resources in the reverse order. Default value: true + symmetrical + If true, which is the default, stop the resources in the reverse order. Default value: true - - + +
- Mandatory Ordering - - When the then resource cannot run without the first resource being active, one should use mandatory constraints. - To specify a constraint is mandatory, use scores greater than zero. - This will ensure that the then resource will react when the first resource changes state. - - - If the first resource was running and is stopped, the then resource will also be stopped (if it is running). - If the first resource was not running and cannot be started, the then resource will be stopped (if it is running). - If the first resource is (re)started while the then resource is running, the then resource will be stopped and restarted. - + Mandatory Ordering + + When the then resource cannot run without the first resource being active, one should use mandatory constraints. + To specify a constraint is mandatory, use scores greater than zero. + This will ensure that the then resource will react when the first resource changes state. + + + If the first resource was running and is stopped, the then resource will also be stopped (if it is running). + If the first resource was not running and cannot be started, the then resource will be stopped (if it is running). + If the first resource is (re)started while the then resource is running, the then resource will be stopped and restarted. +
- Advisory Ordering - - On the other hand, when score="0" is specified for a constraint, the constraint is considered optional and only has an effect when both resources are stopping and/or starting. - Any change in state by the first resource will have no effect on the then resource. - - - Example of an optional and mandatory ordering constraint - + Advisory Ordering + + On the other hand, when score="0" is specified for a constraint, the constraint is considered optional and only has an effect when both resources are stopping and/or starting. + Any change in state by the first resource will have no effect on the then resource. + + + Example of an optional and mandatory ordering constraint + ]]> - - Some additional information on ordering constraints can be found in the document Ordering Explained. - + + Some additional information on ordering constraints can be found in the document Ordering Explained. +
Placing Resources Relative to other Resources When the location of one resource depends on the location of another one, we call this colocation. - There is an important side-effect of creating a colocation constraint between two resources: it affects the order in which resources are assigned to a node. - If you think about it, it's somewhat obvious. - You can't place A relative to B unless you know where B is + There is an important side-effect of creating a colocation constraint between two resources: it affects the order in which resources are assigned to a node. + If you think about it, it's somewhat obvious. + You can't place A relative to B unless you know where B is While the human brain is sophisticated enough to read the constraint in any order and choose the correct one depending on the situation, the cluster is not quite so smart. Yet. - . - So when you are creating colocation constraints, it is important to consider whether you should colocate A with B or B with A. + . + So when you are creating colocation constraints, it is important to consider whether you should colocate A with B or B with A. - Another thing to keep in mind is that, assuming A is collocated with B, the cluster will also take into account A's preferences when deciding which node to choose for B. - For a detailed look at exactly how this occurs, see the Colocation Explained document. + Another thing to keep in mind is that, assuming A is collocated with B, the cluster will also take into account A's preferences when deciding which node to choose for B. + For a detailed look at exactly how this occurs, see the Colocation Explained document.
- Options - - Properties of a Collocation Constraint - - - + Options +
+ Properties of a Collocation Constraint + + + - Field - Description + Field + Description - - - id - A unique name for the constraint. + + + id + A unique name for the constraint. - rsc - The colocation source. If the constraint cannot be satisfied, the cluster may decide not to allow the resource to run at all. + rsc + The colocation source. If the constraint cannot be satisfied, the cluster may decide not to allow the resource to run at all. - with-rsc - The colocation target. The cluster will decide where to put this resource first and then decide where to put the resource in the rsc field. + with-rsc + The colocation target. The cluster will decide where to put this resource first and then decide where to put the resource in the rsc field. - score - Positive values indicate the resource should run on the same node. Negative values indicate the resources should not run on the same node. Values of +/- INFINITY change "should" to "must". + score + Positive values indicate the resource should run on the same node. Negative values indicate the resources should not run on the same node. Values of +/- INFINITY change "should" to "must". - - -
+ + +
- Mandatory Placement - - Mandatory placement occurs any time the constraint's score is +INFINITY or -INFINITY. - In such cases, if the constraint can't be satisfied, then the rsc resource is not permitted to run. - For score=INFINITY, this includes cases where the with-rsc resource is not active. - - If you need resource1 to always run on the same machine as resource2, you would add the following constraint: - - An example colocation constraint - <rsc_colocation id="colocate" rsc="resource1" with-rsc="resource2" score="INFINITY"/> - - - Remember, because INFINITY was used, if resource2 can't run on any of the cluster nodes (for whatever reason) then resource1 will not be allowed to run. - - Alternatively, you may want the opposite... - that resource1 cannot run on the same machine as resource2. - In this case use score="-INFINITY" - - - An example anti-colocation constraint + Mandatory Placement + + Mandatory placement occurs any time the constraint's score is +INFINITY or -INFINITY. + In such cases, if the constraint can't be satisfied, then the rsc resource is not permitted to run. + For score=INFINITY, this includes cases where the with-rsc resource is not active. + + If you need resource1 to always run on the same machine as resource2, you would add the following constraint: + + An example colocation constraint + <rsc_colocation id="colocate" rsc="resource1" with-rsc="resource2" score="INFINITY"/> + + + Remember, because INFINITY was used, if resource2 can't run on any of the cluster nodes (for whatever reason) then resource1 will not be allowed to run. + + Alternatively, you may want the opposite... + that resource1 cannot run on the same machine as resource2. + In this case use score="-INFINITY" + + + An example anti-colocation constraint <rsc_colocation id="anti-colocate" - rsc="resource1" with-rsc="resource2" score="-INFINITY"/> - - - - Again, by specifying -INFINTY, the constraint is binding. - So if the only place left to run is where resource2 already is, then resource1 may not run anywhere. - + rsc="resource1" with-rsc="resource2" score="-INFINITY"/> + + + + Again, by specifying -INFINTY, the constraint is binding. + So if the only place left to run is where resource2 already is, then resource1 may not run anywhere. +
- Advisory Placement - - If mandatory placement is about "must" and "must not", then advisory placement is the "I'd prefer if" alternative. - For constraints with scores greater than -INFINITY and less than INFINITY, the cluster will try and accommodate your wishes but may ignore them if the alternative is to stop some of the cluster resources. - - Like in life, where if enough people prefer something it effectively becomes mandatory, advisory colocation constraints can combine with other elements of the configuration to behave as if they were mandatory. - - An example advisory-only colocation constraint - <rsc_colocation id="colocate-maybe" rsc="resource1" with-rsc="resource2" score="500"/> - - + Advisory Placement + + If mandatory placement is about "must" and "must not", then advisory placement is the "I'd prefer if" alternative. + For constraints with scores greater than -INFINITY and less than INFINITY, the cluster will try and accommodate your wishes but may ignore them if the alternative is to stop some of the cluster resources. + + Like in life, where if enough people prefer something it effectively becomes mandatory, advisory colocation constraints can combine with other elements of the configuration to behave as if they were mandatory. + + An example advisory-only colocation constraint + <rsc_colocation id="colocate-maybe" rsc="resource1" with-rsc="resource2" score="500"/> + +
Ordering Sets of Resources A common situation is for an administrator to create a chain of ordered resources, such as: - A chain of ordered resources - + A chain of ordered resources + ]]> -
- Ordered Set - - - - - Visual representation of the four resources' start order for the above constraints - -
+
+ Ordered Set + + + + + Visual representation of the four resources' start order for the above constraints + +
To simplify this situation, there is an alternate format for ordering constraints: - A chain of ordered resources expressed as a set - + A chain of ordered resources expressed as a set + ]]> Resource sets have the same ordering semantics as groups. - A group resource with the equivalent ordering rules - + A group resource with the equivalent ordering rules + ]]> - While the set-based format is not less verbose, it is significantly easier to get right and maintain. - It can also be expanded to allow ordered sets of (un)ordered resources. - In the example below, rscA and rscB can both start in parallel, as can rscC and rscD, however rscC and rscD can only start once both rscA and rscB are active. + While the set-based format is not less verbose, it is significantly easier to get right and maintain. + It can also be expanded to allow ordered sets of (un)ordered resources. + In the example below, rscA and rscB can both start in parallel, as can rscC and rscD, however rscC and rscD can only start once both rscA and rscB are active. - Ordered sets of unordered resources - + Ordered sets of unordered resources + ]]> -
- Two Sets of Unordered Resources - - - - - Visual representation of the start order for two ordered sets of unordered resources - -
+
+ Two Sets of Unordered Resources + + + + + Visual representation of the start order for two ordered sets of unordered resources + +
Of course either set -- or both sets -- of resources can also be internally ordered (by setting sequential="true") and there is no limit to the number of sets that can be specified. - Advanced use of set ordering - Three ordered sets, two of which are internally unordered - + Advanced use of set ordering - Three ordered sets, two of which are internally unordered + ]]> -
- Three Resources Sets - - - - - Visual representation of the start order for the three sets defined above - -
+
+ Three Resources Sets + + + + + Visual representation of the start order for the three sets defined above + +
Collocating Sets of Resources - Another common situation is for an administrator to create a set of collocated resources. - Previously this was possible either by defining a resource group (See ) which could not always accurately express the design; or by defining each relationship as an individual constraint, causing a constraint explosion as the number of resources and combinations grew. + Another common situation is for an administrator to create a set of collocated resources. + Previously this was possible either by defining a resource group (See ) which could not always accurately express the design; or by defining each relationship as an individual constraint, causing a constraint explosion as the number of resources and combinations grew. - A chain of collocated resources - + A chain of collocated resources + ]]> - To make things easier, we allow an alternate form of colocation constraints using resource_sets. - Just like the expanded version, a resource that can't be active also prevents any resource that must be collocated with it from being active. - For example, if B was not able to run, then both C (and by inference D) must also remain stopped. + To make things easier, we allow an alternate form of colocation constraints using resource_sets. + Just like the expanded version, a resource that can't be active also prevents any resource that must be collocated with it from being active. + For example, if B was not able to run, then both C (and by inference D) must also remain stopped. - The equivalent colocation chain expressed using <literal>resource_sets</literal> - + The equivalent colocation chain expressed using <literal>resource_sets</literal> + ]]> Resource sets have the same colocation semantics as groups. - A group resource with the equivalent colocation rules - + A group resource with the equivalent colocation rules + ]]> - This notation can also be used in this context to tell the cluster that a set of resources must all be located with a common peer, but have no dependencies on each other. - In this scenario, unlike the previous, B would be allowed to remain active even if A or C (or both) were inactive. + This notation can also be used in this context to tell the cluster that a set of resources must all be located with a common peer, but have no dependencies on each other. + In this scenario, unlike the previous, B would be allowed to remain active even if A or C (or both) were inactive. - Using colocation sets to specify a common peer. - + Using colocation sets to specify a common peer. + ]]> - Of course there is no limit to the number and size of the sets used. - The only thing that matters is that in order for any member of set N to be active, all the members of set N+1 must also be active (and naturally on the same node); and if a set has sequential="true", then in order for member M to be active, member M+1 must also be active. - You can even specify the role in which the members of a set must be in using the set's role attribute. + Of course there is no limit to the number and size of the sets used. + The only thing that matters is that in order for any member of set N to be active, all the members of set N+1 must also be active (and naturally on the same node); and if a set has sequential="true", then in order for member M to be active, member M+1 must also be active. + You can even specify the role in which the members of a set must be in using the set's role attribute. - A colocation chain where the members of the middle set have no inter-dependencies and the last has master status. - + A colocation chain where the members of the middle set have no inter-dependencies and the last has master status. + ]]> -
- Another Three Resources Sets - - - - - Visual representation of a colocation chain where the members of the middle set have no inter-dependencies - -
+
+ Another Three Resources Sets + + + + + Visual representation of a colocation chain where the members of the middle set have no inter-dependencies + +
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Intro.xml b/doc/Pacemaker_Explained/en-US/Ch-Intro.xml index c5c0201d55..992a771e80 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Intro.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Intro.xml @@ -1,172 +1,172 @@ Read-Me-First
The Scope of this Document - The purpose of this document is to definitively explain the concepts used to configure Pacemaker. - To achieve this, it will focus exclusively on the XML syntax used to configure the CIB. + The purpose of this document is to definitively explain the concepts used to configure Pacemaker. + To achieve this, it will focus exclusively on the XML syntax used to configure the CIB. - For those that are allergic to XML, Pacemaker comes with a cluster shell; a Python based GUI exists, too, however these tools will not be covered at all in this document - I hope, however, that the concepts explained here make the functionality of these tools more easily understood. - , precisely because they hide the XML. + For those that are allergic to XML, Pacemaker comes with a cluster shell; a Python based GUI exists, too, however these tools will not be covered at all in this document + I hope, however, that the concepts explained here make the functionality of these tools more easily understood. + , precisely because they hide the XML. - Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario. - Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster. + Additionally, this document is NOT a step-by-step how-to guide for configuring a specific clustering scenario. + Although such guides exist, the purpose of this document is to provide an understanding of the building blocks that can be used to construct any type of Pacemaker cluster.
What Is Pacemaker? - Pacemaker is a cluster resource manager. - It achieves maximum availability for your cluster services (aka. resources) by detecting and recovering from node and resource-level failures by making use of the messaging and membership capabilities provided by your preferred cluster infrastructure (either Corosync or Heartbeat). + Pacemaker is a cluster resource manager. + It achieves maximum availability for your cluster services (aka. resources) by detecting and recovering from node and resource-level failures by making use of the messaging and membership capabilities provided by your preferred cluster infrastructure (either Corosync or Heartbeat). Pacemaker's key features include: - Detection and recovery of node and service-level failures - Storage agnostic, no requirement for shared storage - Resource agnostic, anything that can be scripted can be clustered - Supports STONITH for ensuring data integrity - Supports large and small clusters - Supports both quorate and resource driven clusters TODO: quorum-driven? - Supports practically any redundancy configuration - Automatically replicated configuration that can be updated from any node - Ability to specify cluster-wide service ordering, colocation and anti-colocation - Support for advanced services type - - Clones: for services which need to be active on multiple nodes - Multi-state: for services with multiple modes (eg. master/slave, primary/secondary) - - - Unified, scriptable, cluster shell + Detection and recovery of node and service-level failures + Storage agnostic, no requirement for shared storage + Resource agnostic, anything that can be scripted can be clustered + Supports STONITH for ensuring data integrity + Supports large and small clusters + Supports both quorate and resource driven clusters TODO: quorum-driven? + Supports practically any redundancy configuration + Automatically replicated configuration that can be updated from any node + Ability to specify cluster-wide service ordering, colocation and anti-colocation + Support for advanced services type + + Clones: for services which need to be active on multiple nodes + Multi-state: for services with multiple modes (eg. master/slave, primary/secondary) + + + Unified, scriptable, cluster shell
Types of Pacemaker Clusters Pacemaker makes no assumptions about your environment, this allows it to support practically any redundancy configuration including Active/Active, Active/Passive, N+1, N+M, N-to-1 and N-to-N. -
- Active/Passive Redundancy - - - - - Two-node Active/Passive clusters using Pacemaker and DRBD are a cost-effective solution for many High Availability situations. - -
+
+ Active/Passive Redundancy + + + + + Two-node Active/Passive clusters using Pacemaker and DRBD are a cost-effective solution for many High Availability situations. + +
-
- Shared Failover - - - - - By supporting many nodes, Pacemaker can dramatically reduce hardware costs by allowing several active/passive clusters to be combined and share a common backup node - -
+
+ Shared Failover + + + + + By supporting many nodes, Pacemaker can dramatically reduce hardware costs by allowing several active/passive clusters to be combined and share a common backup node + +
-
- N to N Redundancy - - - - - - When shared storage is available, every node can potentially be used for failover. - Pacemaker can even run multiple copies of services to spread out the workload. - - -
+
+ N to N Redundancy + + + + + + When shared storage is available, every node can potentially be used for failover. + Pacemaker can even run multiple copies of services to spread out the workload. + + +
Pacemaker Architecture At the highest level, the cluster is made up of three pieces: - + Core cluster infrastructure providing messaging and membership functionality (illustrated in red) - - + + Non-cluster aware components (illustrated in green). - In a Pacemaker cluster, these pieces include not only the scripts that knows how to start, stop and monitor resources, but also a local daemon that masks the differences between the different standards these scripts implement. - - + In a Pacemaker cluster, these pieces include not only the scripts that knows how to start, stop and monitor resources, but also a local daemon that masks the differences between the different standards these scripts implement. + + A brain (illustrated in blue) that processes and reacts to events from the cluster (nodes leaving or joining) and resources (eg. monitor failures) as well as configuration changes from the administrator. - In response to all of these events, Pacemaker will compute the ideal state of the cluster and plot a path to achieve it. - This may include moving resources, stopping nodes and even forcing nodes offline with remote power switches. - + In response to all of these events, Pacemaker will compute the ideal state of the cluster and plot a path to achieve it. + This may include moving resources, stopping nodes and even forcing nodes offline with remote power switches. + -
- Conceptual Stack Overview - - - - - Conceptual overview of the cluster stack - -
+
+ Conceptual Stack Overview + + + + + Conceptual overview of the cluster stack + +
When combined with Corosync, Pacemaker also supports popular open source cluster filesystems - Even though Pacemaker also supports Heartbeat, the filesystems need to use the stack for messaging and membership and Corosync seems to be what they're standardizing on. - Technically it would be possible for them to support Heartbeat as well, however there seems little interest in this. - - . - Due to recent standardization within the cluster filesystem community, they make use of a common distributed lock manager which makes use of Corosync for its messaging capabilities and Pacemaker for its membership (which nodes are up/down) and fencing services. + Even though Pacemaker also supports Heartbeat, the filesystems need to use the stack for messaging and membership and Corosync seems to be what they're standardizing on. + Technically it would be possible for them to support Heartbeat as well, however there seems little interest in this. + + . + Due to recent standardization within the cluster filesystem community, they make use of a common distributed lock manager which makes use of Corosync for its messaging capabilities and Pacemaker for its membership (which nodes are up/down) and fencing services. -
- The Pacemaker Stack - - - - - The Pacemaker stack when running on Corosync - -
+
+ The Pacemaker Stack + + + + + The Pacemaker stack when running on Corosync + +
- Internal Components - Pacemaker itself is composed of four key components (illustrated below in the same color scheme as the previous diagram): - - CIB (aka. Cluster Information Base) - CRMd (aka. Cluster Resource Management daemon) - PEngine (aka. PE or Policy Engine) - STONITHd - - -
- Internal Components - - - - - Subsystems of a Pacemaker cluster - -
-
- - The CIB uses XML to represent both the cluster's configuration and current state of all resources in the cluster. - The contents of the CIB are automatically kept in sync across the entire cluster and are used by the PEngine to compute the ideal state of the cluster and how it should be achieved. - - - This list of instructions is then fed to the DC (Designated Controller). - Pacemaker centralizes all cluster decision making by electing one of the CRMd instances to act as a master. - Should the elected CRMd process (or the node it is on) fail... - a new one is quickly established. - - The DC carries out PEngine's instructions in the required order by passing them to either the LRMd (Local Resource Management daemon) or CRMd peers on other nodes via the cluster messaging infrastructure (which in turn passes them on to their LRMd process). - The peer nodes all report the results of their operations back to the DC and, based on the expected and actual results, will either execute any actions that needed to wait for the previous one to complete, or abort processing and ask the PEngine to recalculate the ideal cluster state based on the unexpected results. - - In some cases, it may be necessary to power off nodes in order to protect shared data or complete resource recovery. - For this Pacemaker comes with STONITHd. - STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and is usually implemented with a remote power switch. - In Pacemaker, STONITH devices are modeled as resources (and configured in the CIB) to enable them to be easily monitored for failure, however STONITHd takes care of understanding the STONITH topology such that its clients simply request a node be fenced and it does the rest. - + Internal Components + Pacemaker itself is composed of four key components (illustrated below in the same color scheme as the previous diagram): + + CIB (aka. Cluster Information Base) + CRMd (aka. Cluster Resource Management daemon) + PEngine (aka. PE or Policy Engine) + STONITHd + + +
+ Internal Components + + + + + Subsystems of a Pacemaker cluster + +
+
+ + The CIB uses XML to represent both the cluster's configuration and current state of all resources in the cluster. + The contents of the CIB are automatically kept in sync across the entire cluster and are used by the PEngine to compute the ideal state of the cluster and how it should be achieved. + + + This list of instructions is then fed to the DC (Designated Controller). + Pacemaker centralizes all cluster decision making by electing one of the CRMd instances to act as a master. + Should the elected CRMd process (or the node it is on) fail... + a new one is quickly established. + + The DC carries out PEngine's instructions in the required order by passing them to either the LRMd (Local Resource Management daemon) or CRMd peers on other nodes via the cluster messaging infrastructure (which in turn passes them on to their LRMd process). + The peer nodes all report the results of their operations back to the DC and, based on the expected and actual results, will either execute any actions that needed to wait for the previous one to complete, or abort processing and ask the PEngine to recalculate the ideal cluster state based on the unexpected results. + + In some cases, it may be necessary to power off nodes in order to protect shared data or complete resource recovery. + For this Pacemaker comes with STONITHd. + STONITH is an acronym for Shoot-The-Other-Node-In-The-Head and is usually implemented with a remote power switch. + In Pacemaker, STONITH devices are modeled as resources (and configured in the CIB) to enable them to be easily monitored for failure, however STONITHd takes care of understanding the STONITH topology such that its clients simply request a node be fenced and it does the rest. +
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Nodes.xml b/doc/Pacemaker_Explained/en-US/Ch-Nodes.xml index e4617e0511..80b8bff2c0 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Nodes.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Nodes.xml @@ -1,128 +1,128 @@ Cluster Nodes
Defining a Cluster Node Each node in the cluster will have an entry in the nodes section containing its UUID, uname, and type. - Example cluster node entry - ]]> - + Example cluster node entry + ]]> + - In normal circumstances, the admin should let the cluster populate this information automatically from the communications and membership data. - However one can use the crm_uuid tool to read an existing UUID or define a value before the cluster starts. + In normal circumstances, the admin should let the cluster populate this information automatically from the communications and membership data. + However one can use the crm_uuid tool to read an existing UUID or define a value before the cluster starts.
Describing a Cluster Node - Beyond the basic definition of a node the administrator can also describe the node's attributes, such as how much RAM, disk, what OS or kernel version it has, perhaps even its physical location. - This information can then be used by the cluster when deciding where to place resources. - For more information on the use of node attributes, see the section on . + Beyond the basic definition of a node the administrator can also describe the node's attributes, such as how much RAM, disk, what OS or kernel version it has, perhaps even its physical location. + This information can then be used by the cluster when deciding where to place resources. + For more information on the use of node attributes, see the section on . Node attributes can be specified ahead of time or populated later, when the cluster is running, using crm_attribute. Below is what the node's definition would look like if the admin ran the command:
- The result of using crm_attribute to specify which kernel pcmk-1 is running - crm_attribute --type nodes --node-uname pcmk-1 --attr-name kernel --attr-value `uname -r` + The result of using crm_attribute to specify which kernel pcmk-1 is running + crm_attribute --type nodes --node-uname pcmk-1 --attr-name kernel --attr-value `uname -r` ]]>
A simpler way to determine the current value of an attribute is to use crm_attribute command again: crm_attribute --type nodes --node-uname pcmk-1 --attr-name kernel --get-value - By specifying --type nodes the admin tells the cluster that this attribute is persistent. - There are also transient attributes which are kept in the status section which are "forgotten" whenever the node rejoins the cluster. - The cluster uses this area to store a record of how many times a resource has failed on that node but administrators can also read and write to this section by specifying --type status. + By specifying --type nodes the admin tells the cluster that this attribute is persistent. + There are also transient attributes which are kept in the status section which are "forgotten" whenever the node rejoins the cluster. + The cluster uses this area to store a record of how many times a resource has failed on that node but administrators can also read and write to this section by specifying --type status.
Adding a New Cluster Node
- Corosync - Adding a new node is as simple as installing Corosync and Pacemaker, and copying /etc/corosync/corosync.conf and /etc/ais/authkey (if it exists) from an existing node. + Corosync + Adding a new node is as simple as installing Corosync and Pacemaker, and copying /etc/corosync/corosync.conf and /etc/ais/authkey (if it exists) from an existing node. You may need to modify the mcastaddr option to match the new node's IP address. - If a log message containing "Invalid digest" appears from Corosync, the keys are not consistent between the machines. + If a log message containing "Invalid digest" appears from Corosync, the keys are not consistent between the machines.
- Heartbeat - Provided you specified autojoin any in ha.cf, adding a new node is as simple as installing heartbeat and copying ha.cf and authkeys from an existing node. - If you don't want to use autojoin, then after setting up ha.cf and authkeys, you must use the hb_addnode command before starting the new node. + Heartbeat + Provided you specified autojoin any in ha.cf, adding a new node is as simple as installing heartbeat and copying ha.cf and authkeys from an existing node. + If you don't want to use autojoin, then after setting up ha.cf and authkeys, you must use the hb_addnode command before starting the new node.
Removing a Cluster Node
- Corosync - - Because the messaging and membership layers are the authoritative source for cluster nodes, deleting them from the CIB is not a reliable solution. - First one must arrange for heartbeat to forget about the node (pcmk-1 in the example below). - - On the host to be removed: - - - Find and record the node's Corosync id: crm_node -i - - - Stop the cluster: /etc/init.d/corosync stop - - - Next, from one of the remaining active cluster nodes: - - - Tell the cluster to forget about the removed host: crm_node -R COROSYNC_ID - - - Only now is it safe to delete the node from the CIB with: - cibadmin --delete --obj_type nodes --crm_xml '<node uname="pcmk-1"/>' - cibadmin --delete --obj_type status --crm_xml '<node_state uname="pcmk-1"/>' - - + Corosync + + Because the messaging and membership layers are the authoritative source for cluster nodes, deleting them from the CIB is not a reliable solution. + First one must arrange for heartbeat to forget about the node (pcmk-1 in the example below). + + On the host to be removed: + + + Find and record the node's Corosync id: crm_node -i + + + Stop the cluster: /etc/init.d/corosync stop + + + Next, from one of the remaining active cluster nodes: + + + Tell the cluster to forget about the removed host: crm_node -R COROSYNC_ID + + + Only now is it safe to delete the node from the CIB with: + cibadmin --delete --obj_type nodes --crm_xml '<node uname="pcmk-1"/>' + cibadmin --delete --obj_type status --crm_xml '<node_state uname="pcmk-1"/>' + +
- Heartbeat - - Because the messaging and membership layers are the authoritative source for cluster nodes, deleting them from the CIB is not a reliable solution. - First one must arrange for heartbeat to forget about the node (pcmk-1 in the example below). - To do this, shut down heartbeat on the node and then, from one of the remaining active cluster nodes, run: - - hb_delnode pcmk-1 - Only then is it safe to delete the node from the CIB with: - cibadmin --delete --obj_type nodes --crm_xml '<node uname="pcmk-1"/>' - cibadmin --delete --obj_type status --crm_xml '<node_state uname="pcmk-1"/>' + Heartbeat + + Because the messaging and membership layers are the authoritative source for cluster nodes, deleting them from the CIB is not a reliable solution. + First one must arrange for heartbeat to forget about the node (pcmk-1 in the example below). + To do this, shut down heartbeat on the node and then, from one of the remaining active cluster nodes, run: + + hb_delnode pcmk-1 + Only then is it safe to delete the node from the CIB with: + cibadmin --delete --obj_type nodes --crm_xml '<node uname="pcmk-1"/>' + cibadmin --delete --obj_type status --crm_xml '<node_state uname="pcmk-1"/>'
Replacing a Cluster Node
- Corosync - The five-step guide to replacing an existing cluster node: - - Make sure the old node is completely stopped - Give the new machine the same hostname and IP address as the old one - Install the cluster software :-) - Copy /etc/corosync/corosync.conf and /etc/ais/authkey (if it exists) to the new node - Start the new cluster node - - If a log message containing "Invalid digest" appears from Corosync, the keys are not consistent between the machines. + Corosync + The five-step guide to replacing an existing cluster node: + + Make sure the old node is completely stopped + Give the new machine the same hostname and IP address as the old one + Install the cluster software :-) + Copy /etc/corosync/corosync.conf and /etc/ais/authkey (if it exists) to the new node + Start the new cluster node + + If a log message containing "Invalid digest" appears from Corosync, the keys are not consistent between the machines.
- Heartbeat - The seven-step guide to replacing an existing cluster node: - - Make sure the old node is completely stopped - Give the new machine the same hostname as the old one - Go to an active cluster node and look up the UUID for the old node in /var/lib/heartbeat/hostcache - Install the cluster software - Copy ha.cf and authkeys to the new node - On the new node, populate it's UUID using crm_uuid -w and the UUID from step 2 - Start the new cluster node - + Heartbeat + The seven-step guide to replacing an existing cluster node: + + Make sure the old node is completely stopped + Give the new machine the same hostname as the old one + Go to an active cluster node and look up the UUID for the old node in /var/lib/heartbeat/hostcache + Install the cluster software + Copy ha.cf and authkeys to the new node + On the new node, populate it's UUID using crm_uuid -w and the UUID from step 2 + Start the new cluster node +
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Options.txt index a6cb66f752..e314980a05 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Options.txt @@ -1,282 +1,276 @@ = Cluster Options = == Special Options == indexterm:[Special Cluster Options] indexterm:[Cluster Options,Special Options] The reason for these fields to be placed at the top level instead of with the rest of cluster options is simply a matter of parsing. These options are used by the configuration database which is, by design, mostly ignorant of the content it holds. So the decision was made to place them in an easy to find location. == Configuration Version == indexterm:[Configuration Version, Cluster Option] indexterm:[Cluster Options,Configuration Version] When a node joins the cluster, the cluster will perform a check to see who has the best configuration based on the fields below. It then asks the node with the highest (+admin_epoch+, +epoch+, +num_updates+) tuple to replace the configuration on all the nodes - which makes setting them, and setting them correctly, very important. .Configuration Version Properties [width="95%",cols="1m,5<",options="header",align="center"] |========================================================= |Field |Description | admin_epoch | indexterm:[admin_epoch Cluster Option] indexterm:[Cluster Options,admin_epoch] Never modified by the cluster. Use this to make the configurations on any inactive nodes obsolete. _Never set this value to zero_, in such cases the cluster cannot tell the difference between your configuration and the "empty" one used when nothing is found on disk. | epoch | indexterm:[epoch Cluster Option] indexterm:[Cluster Options,epoch] Incremented every time the configuration is updated (usually by the admin) | num_updates | indexterm:[num_updates Cluster Option] indexterm:[Cluster Options,num_updates] Incremented every time the configuration or status is updated (usually by the cluster) |========================================================= == Other Fields == .Properties Controlling Validation [width="95%",cols="1m,5<",options="header",align="center"] |========================================================= |Field |Description | validate-with | indexterm:[validate-with Cluster Option] indexterm:[Cluster Options,validate-with] Determines the type of validation being done on the configuration. If set to "none", the cluster will not verify that updates conform to the DTD (nor reject ones that don't). This option can be useful when operating a mixed version cluster during an upgrade. |========================================================= == Fields Maintained by the Cluster == .Properties Maintained by the Cluster [width="95%",cols="1m,5<",options="header",align="center"] |========================================================= |Field |Description -|crm-debug-origin | -indexterm:[crm-debug-origin Cluster Fields] -indexterm:[Cluster Fields,crm-debug-origin] -Indicates where the last update came from. Informational purposes only. - |cib-last-written | indexterm:[cib-last-written Cluster Fields] indexterm:[Cluster Fields,cib-last-written] Indicates when the configuration was last written to disk. Informational purposes only. |dc-uuid | indexterm:[dc-uuid Cluster Fields] indexterm:[Cluster Fields,dc-uuid] Indicates which cluster node is the current leader. Used by the cluster when placing resources and determining the order of some events. |have-quorum | indexterm:[have-quorum Cluster Fields] indexterm:[Cluster Fields,have-quorum] Indicates if the cluster has quorum. If false, this may mean that the cluster cannot start resources or fence other nodes. See +no-quorum-policy+ below. |========================================================= Note that although these fields can be written to by the admin, in most cases the cluster will overwrite any values specified by the admin with the "correct" ones. To change the +admin_epoch+, for example, one would use: pass:[cibadmin --modify --crm_xml ‘<cib admin_epoch="42"/>'] A complete set of fields will look something like this: .An example of the fields set for a cib object [source,XML] ------- ------- == Cluster Options == Cluster options, as you might expect, control how the cluster behaves when confronted with certain situations. They are grouped into sets and, in advanced configurations, there may be more than one. -footnote:[This will be described later in the section on where we will show how to have the cluster use +footnote:[This will be described later in the section on +<> where we will show how to have the cluster use different sets of options during working hours (when downtime is usually to be avoided at all costs) than it does during the weekends (when resources can be moved to the their preferred hosts without bothering end users)] For now we will describe the simple case where each option is present at most once. == Available Cluster Options == .Cluster Options [width="95%",cols="5m,2m,13",options="header",align="center"] |========================================================= |Option |Default |Description | batch-limit | 30 | indexterm:[batch-limit Cluster Options] indexterm:[Cluster Options,batch-limit] The number of jobs that the TE is allowed to execute in parallel. The "correct" value will depend on the speed and load of your network and cluster nodes. | migration-limit | -1 (unlimited) | indexterm:[migration-limit Cluster Options] indexterm:[Cluster Options,migration-limit] The number of migration jobs that the TE is allowed to execute in parallel on a node. | no-quorum-policy | stop | indexterm:[no-quorum-policy Cluster Options] indexterm:[Cluster Options,no-quorum-policy] What to do when the cluster does not have quorum. Allowed values: * ignore - continue all resource management * freeze - continue resource management, but don't recover resources from nodes not in the affected partition * stop - stop all resources in the affected cluster partition * suicide - fence all nodes in the affected cluster partition | symmetric-cluster | TRUE | indexterm:[symmetric-cluster Cluster Options] indexterm:[Cluster Options,symmetric-cluster] Can all resources run on any node by default? | stonith-enabled | TRUE | indexterm:[stonith-enabled Cluster Options] indexterm:[Cluster Options,stonith-enabled] Should failed nodes and nodes with resources that can't be stopped be shot? If you value your data, set up a STONITH device and enable this. If true, or unset, the cluster will refuse to start resources unless one or more STONITH resources have been configured also. | stonith-action | reboot | indexterm:[stonith-action Cluster Options] indexterm:[Cluster Options,stonith-action] Action to send to STONITH device. Allowed values: reboot, poweroff. | cluster-delay | 60s | indexterm:[cluster-delay Cluster Options] indexterm:[Cluster Options,cluster-delay] Round trip delay over the network (excluding action execution). The "correct" value will depend on the speed and load of your network and cluster nodes. | stop-orphan-resources | TRUE | indexterm:[stop-orphan-resources Cluster Options] indexterm:[Cluster Options,stop-orphan-resources] Should deleted resources be stopped? | stop-orphan-actions | TRUE | indexterm:[stop-orphan-actions Cluster Options] indexterm:[Cluster Options,stop-orphan-actions] Should deleted actions be cancelled? | start-failure-is-fatal | TRUE | indexterm:[start-failure-is-fatal Cluster Options] indexterm:[Cluster Options,start-failure-is-fatal] When set to FALSE, the cluster will instead use the resource's +failcount+ and value for +resource-failure-stickiness+. | pe-error-series-max | -1 (all) | indexterm:[pe-error-series-max Cluster Options] indexterm:[Cluster Options,pe-error-series-max] The number of PE inputs resulting in ERRORs to save. Used when reporting problems. | pe-warn-series-max | -1 (all) | indexterm:[pe-warn-series-max Cluster Options] indexterm:[Cluster Options,pe-warn-series-max] The number of PE inputs resulting in WARNINGs to save. Used when reporting problems. | pe-input-series-max | -1 (all) | indexterm:[pe-input-series-max Cluster Options] indexterm:[Cluster Options,pe-input-series-max] The number of "normal" PE inputs to save. Used when reporting problems. |========================================================= You can always obtain an up-to-date list of cluster options, including their default values, by running the pass:[pengine metadata] command. == Querying and Setting Cluster Options == indexterm:[Querying Cluster Options] indexterm:[Setting Cluster Options] indexterm:[Cluster Options,Querying] indexterm:[Cluster Options,Setting] Cluster options can be queried and modified using the pass:[crm_attribute] tool. To get the current value of +cluster-delay+, simply use: pass:[crm_attribute --attr-name cluster-delay --get-value] which is more simply written as pass:[crm_attribute --get-value -n cluster-delay] If a value is found, you'll see a result like this: ======= pass:[ # crm_attribute --get-value -n cluster-delay] name=cluster-delay value=60s ======== However, if no value is found, the tool will display an error: ======= pass:[# crm_attribute --get-value -n clusta-deway] name=clusta-deway value=(null) Error performing operation: The object/attribute does not exist ======== To use a different value, eg. +30+, simply run: pass:[crm_attribute --attr-name cluster-delay --attr-value 30s] To go back to the cluster's default value you can delete the value, for example with this command: pass:[crm_attribute --attr-name cluster-delay --delete-attr] == When Options are Listed More Than Once == If you ever see something like the following, it means that the option you're modifying is present more than once. .Deleting an option that is listed twice ======= pass:[# crm_attribute --attr-name batch-limit --delete-attr] Multiple attributes match name=batch-limit in crm_config: Value: 50 (set=cib-bootstrap-options, id=cib-bootstrap-options-batch-limit) Value: 100 (set=custom, id=custom-batch-limit) Please choose from one of the matches above and supply the 'id' with --attr-id ======= In such cases follow the on-screen instructions to perform the requested action. To determine which value is currently being used by -the cluster, please refer to the section on . +the cluster, please refer to the section on <>. diff --git a/doc/Pacemaker_Explained/en-US/Ch-Resources.xml b/doc/Pacemaker_Explained/en-US/Ch-Resources.xml index f1ccb1c29e..2075048f8d 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Resources.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Resources.xml @@ -1,522 +1,522 @@ Cluster Resources
What is a Cluster Resource ResourceDescription - The role of a resource agent is to abstract the service it provides and present a consistent view to the cluster, which allows the cluster to be agnostic about the resources it manages. - The cluster doesn't need to understand how the resource works because it relies on the resource agent to do the right thing when given a start, stop or monitor command. + The role of a resource agent is to abstract the service it provides and present a consistent view to the cluster, which allows the cluster to be agnostic about the resources it manages. + The cluster doesn't need to understand how the resource works because it relies on the resource agent to do the right thing when given a start, stop or monitor command. For this reason it is crucial that resource agents are well tested. Typically resource agents come in the form of shell scripts, however they can be written using any technology (such as C, Python or Perl) that the author is comfortable with.
Supported Resource Classes ResourceClasses - There are three basic classes of agents supported by Pacemaker. - In order of encouraged usage they are: + There are three basic classes of agents supported by Pacemaker. + In order of encouraged usage they are:
- Open Cluster Framework + Open Cluster Framework ResourceOCF OCFResources Open Cluster FrameworkResources - The OCF Spec - at least as it relates to resource agents.'Note: The Pacemaker implementation has been somewhat extended from the OCF Specs, but none of those changes are incompatible with the original OCF specification. 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 the exit codes that actions must return + The OCF Spec - at least as it relates to resource agents.'Note: The Pacemaker implementation has been somewhat extended from the OCF Specs, but none of those changes are incompatible with the original OCF specification. 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 the exit codes that actions must return Included with the cluster is the ocf-tester script, which can be useful in this regard. - . - 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. - For more information, see the reference and . + . + 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. + For more information, see the reference and .
- Linux Standard Base + Linux Standard Base ResourceLSB LSBResources Linus Standard BaseResources - - LSB resource agents are those typically found in /etc/init.d. - Generally they are provided by the OS/distribution and, in order to be used with the cluster, they must conform to the LSB Spec - See - for the LSB Spec (as it relates to init scripts). - . - - - Many distributions claim LSB compliance but ship with broken init scripts. - To see if your init script is LSB-compatible, see the FAQ entry . - The most common problems are: - - - Not implementing the status operation at all - Not observing the correct exit status codes for start/stop/status actions - Starting a started resource returns an error (this violates the LSB spec) - Stopping a stopped resource returns an error (this violates the LSB spec) - + + LSB resource agents are those typically found in /etc/init.d. + Generally they are provided by the OS/distribution and, in order to be used with the cluster, they must conform to the LSB Spec + See + for the LSB Spec (as it relates to init scripts). + . + + + Many distributions claim LSB compliance but ship with broken init scripts. + To see if your init script is LSB-compatible, see the FAQ entry . + The most common problems are: + + + Not implementing the status operation at all + Not observing the correct exit status codes for start/stop/status actions + Starting a started resource returns an error (this violates the LSB spec) + Stopping a stopped resource returns an error (this violates the LSB spec) +
- Legacy Heartbeat + Legacy Heartbeat ResourceHeartbeat (legacy) HeartbeatLegacy Resources - - 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. - To enable administrators to continue to use these agents, they are supported by the new cluster manager - See for more information.. - + + 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. + To enable administrators to continue to use these agents, they are supported by the new cluster manager + See for more information.. +
- STONITH + STONITH ResourceSTONITH STONITHResources - - There is also an additional class, STONITH, which is used exclusively for fencing related resources. - This is discussed later in . - + + There is also an additional class, STONITH, which is used exclusively for fencing related resources. + This is discussed later in . +
Properties These values tell the cluster which script to use for the resource, where to find that script and what standards it conforms to. - Properties of a Primitive Resource - - - + Properties of a Primitive Resource + + + Field Description - - + + id id Your name for the resource classResource Field ResourceFieldclass class The standard the script conforms to. Allowed values: heartbeat, lsb, ocf, stonith typeResource Field ResourceFieldtype type The name of the Resource Agent you wish to use. Eg. IPaddr or Filesystem providerResource Field ResourceFieldprovider provider The OCF spec allows multiple vendors to supply the same ResourceAgent. To use the OCF resource agents supplied with Heartbeat, you should specify heartbeat here. - - + +
Resource definitions can be queried with the crm_resource tool. For example crm_resource --resource Email --query-xml might produce - An example LSB resource - ]]> - + An example LSB resource + ]]> + - One of the main drawbacks to LSB resources is that they do not allow any parameters! - + One of the main drawbacks to LSB resources is that they do not allow any parameters! + Example for an OCF resource: - An example OCF resource - + An example OCF resource + ]]> Or, finally for the equivalent legacy Heartbeat resource: - An example Heartbeat resource - + An example Heartbeat resource + ]]> - - Heartbeat resources take only ordered and unnamed parameters. - The supplied name therefore indicates the order in which they are passed to the script. - Only single digit values are allowed. - - + + Heartbeat resources take only ordered and unnamed parameters. + The supplied name therefore indicates the order in which they are passed to the script. + Only single digit values are allowed. + +
Resource Options Options are used by the cluster to decide how your resource should behave and can be easily set using the --meta option of the crm_resource command. - Options for a Primitive Resource - - - - + Options for a Primitive Resource + + + + Field Default Description priorityResource Option ResourceOptionpriority priority 0 If not all resources can be active, the cluster will stop lower priority resources in order to keep higher priority ones active. target-roleResource Option ResourceOptiontarget-role target-role Started - What state should the cluster attempt to keep this resource in? Allowed values: - + What state should the cluster attempt to keep this resource in? Allowed values: + Stopped - Force the resource to be stopped Started - Allow the resource to be started (In the case of multi-state resources, they will not promoted to master) Master - Allow the resource to be started and, if appropriate, promoted - + is-managedResource Option ResourceOptionis-managed is-managed TRUE - Is the cluster allowed to start and stop the resource? - Allowed values: true, false - + Is the cluster allowed to start and stop the resource? + Allowed values: true, false + resource-stickinessResource Option ResourceOptionresource-stickiness resource-stickiness Inherited - How much does the resource prefer to stay where it is? - Defaults to the value of resource-stickiness in the rsc_defaults section - + How much does the resource prefer to stay where it is? + Defaults to the value of resource-stickiness in the rsc_defaults section + migration-thresholdResource Option ResourceOptionmigration-threshold migration-threshold INFINITY (disabled) How many failures may occur for this resource on a node, before this node is marked ineligible to host this resource. failure-timeoutResource Option ResourceOptionfailure-timeout failure-timeout 0 (disabled) How many seconds to wait before acting as if the failure had not occurred, and potentially allowing the resource back to the node on which it failed. multiple-activeResource Option ResourceOptionmultiple-active multiple-active stop_start - What should the cluster do if it ever finds the resource active on more than one node. Allowed values: - + What should the cluster do if it ever finds the resource active on more than one node. Allowed values: + block - mark the resource as unmanaged stop_only - stop all active instances and leave them that way stop_start - stop all active instances and start the resource in one location only - + - - + +
If you performed the following commands on the previous LSB Email resource crm_resource --meta --resource Email --set-parameter priority --property-value 100 - crm_resource --meta --resource Email --set-parameter multiple-active --property-value block + crm_resource --meta --resource Email --set-parameter multiple-active --property-value block the resulting resource definition would be - An LSB resource with cluster options - + An LSB resource with cluster options + ]]>
Setting Global Defaults for Resource Options To set a default value for a resource option, simply add it to the rsc_defaults section with crm_attribute. Thus, crm_attribute --type rsc_defaults --attr-name is-managed --attr-value false would prevent the cluster from starting or stopping any of the resources in the configuration (unless of course the individual resources were specifically enabled and had is-managed set to true).
Instance Attributes The scripts of some resource classes (LSB not being one of them) can be given parameters which determine how they behave and which instance of a service they control. If your resource agent supports parameters, you can add them with the crm_resource command. For instance crm_resource --resource Public-IP --set-parameter ip --property-value 1.2.3.4 would create an entry in the resource like this: - An example OCF resource with instance attributes - + An example OCF resource with instance attributes + ]]> For an OCF resource, the result would be an environment variable called OCF_RESKEY_ip with a value of 1.2.3.4. - The list of instance attributes supported by an OCF script can be found by calling the resource script with the meta-data command. - The output contains an XML description of all the supported attributes, their purpose and default values. + The list of instance attributes supported by an OCF script can be found by calling the resource script with the meta-data command. + The output contains an XML description of all the supported attributes, their purpose and default values. - Displaying the metadata for the Dummy resource agent template + Displaying the metadata for the Dummy resource agent template export OCF_ROOT=/usr/lib/ocf; $OCF_ROOT/resource.d/pacemaker/Dummy meta-data 1.0 - This is a Dummy Resource Agent. It does absolutely nothing except + This is a Dummy Resource Agent. It does absolutely nothing except keep track of whether its running or not. Its purpose in life is for testing and to serve as a template for RA writers. Dummy resource agent Location to store the resource state in. State file - + Dummy attribute that can be changed to cause a reload Dummy attribute that can be changed to cause a reload ]]>
Resource Operations
- Monitoring Resources for Failure - - By default, the cluster will not ensure your resources are still healthy. - To instruct the cluster to do this, you need to add a monitor operation to the resource's definition. - - - An OCF resource with a recurring health check - + Monitoring Resources for Failure + + By default, the cluster will not ensure your resources are still healthy. + To instruct the cluster to do this, you need to add a monitor operation to the resource's definition. + + + An OCF resource with a recurring health check + ]]> - - - Properties of an Operation - - - + +
+ Properties of an Operation + + + - Field - Description + Field + Description - id - Your name for the action. Must be unique. + id + Your name for the action. Must be unique. - name - The action to perform. Common values: monitor, start, stop + name + The action to perform. Common values: monitor, start, stop - interval - How frequently (in seconds) to perform the operation. Default value: 0, meaning never. + interval + How frequently (in seconds) to perform the operation. Default value: 0, meaning never. - timeout - How long to wait before declaring the action has failed. + timeout + How long to wait before declaring the action has failed. - requires - - What conditions need to be satisfied before this action occurs. Allowed values: - + requires + + What conditions need to be satisfied before this action occurs. Allowed values: + nothing - The cluster may start this resource at any time quorum - The cluster can only start this resource if a majority of the configured nodes are active fencing - The cluster can only start this resource if a majority of the configured nodes are active and any failed or unknown nodes have been powered off. - - STONITH resources default to nothing, and all others default to fencing if STONITH is enabled and quorum otherwise. - + + STONITH resources default to nothing, and all others default to fencing if STONITH is enabled and quorum otherwise. + - on-fail - - The action to take if this action ever fails. Allowed values: - + on-fail + + The action to take if this action ever fails. Allowed values: + ignore - Pretend the resource did not fail block - Don't perform any further operations on the resource stop - Stop the resource and do not start it elsewhere restart - Stop the resource and start it again (possibly on a different node) fence - STONITH the node on which the resource failed standby - Move all resources away from the node on which the resource failed - - The default for the stop operation is fence when STONITH is enabled and block otherwise. All other operations default to stop. - + + The default for the stop operation is fence when STONITH is enabled and block otherwise. All other operations default to stop. + - enabled - If false, the operation is treated as if it does not exist. Allowed values: true, false + enabled + If false, the operation is treated as if it does not exist. Allowed values: true, false - - -
+ + +
Setting Global Defaults for Operations To set a default value for a operation option, simply add it to the op_defaults section with crm_attribute. Thus, crm_attribute --type op_defaults --attr-name timeout --attr-value 20s - would default each operation's timeout to 20 seconds. - If an operation's definition also includes a value for timeout, then that value would be used instead (for that operation only). + would default each operation's timeout to 20 seconds. + If an operation's definition also includes a value for timeout, then that value would be used instead (for that operation only).
- When Resources Take a Long Time to Start/Stop - - There are a number of implicit operations that the cluster will always perform - start, stop and a non-recurring monitor operation (used at startup to check the resource isn't already active). - If one of these is taking too long, then you can create an entry for them and simply specify a new value. - - - An OCF resource with custom timeouts for its implicit actions - + When Resources Take a Long Time to Start/Stop + + There are a number of implicit operations that the cluster will always perform - start, stop and a non-recurring monitor operation (used at startup to check the resource isn't already active). + If one of these is taking too long, then you can create an entry for them and simply specify a new value. + + + An OCF resource with custom timeouts for its implicit actions + ]]> - +
- Multiple Monitor Operations - - Provided no two operations (for a single resource) have the same name and interval you can have as many monitor operations as you like. - In this way you can do a superficial health check every minute and progressively more intense ones at higher intervals. - - - To tell the resource agent what kind of check to perform, you need to provide each monitor with a different value for a common parameter. - The OCF standard creates a special parameter called OCF_CHECK_LEVEL for this purpose and dictates that it is "made available to the resource agent without the normal OCF_RESKEY_ prefix". - - - Whatever name you choose, you can specify it by adding an instance_attributes block to the op tag. - Note that it is up to each resource agent to look for the parameter and decide how to use it. - - - An OCF resource with two recurring health checks, performing different levels of checks - specified via <literal>OCF_CHECK_LEVEL</literal>. - + Multiple Monitor Operations + + Provided no two operations (for a single resource) have the same name and interval you can have as many monitor operations as you like. + In this way you can do a superficial health check every minute and progressively more intense ones at higher intervals. + + + To tell the resource agent what kind of check to perform, you need to provide each monitor with a different value for a common parameter. + The OCF standard creates a special parameter called OCF_CHECK_LEVEL for this purpose and dictates that it is "made available to the resource agent without the normal OCF_RESKEY_ prefix". + + + Whatever name you choose, you can specify it by adding an instance_attributes block to the op tag. + Note that it is up to each resource agent to look for the parameter and decide how to use it. + + + An OCF resource with two recurring health checks, performing different levels of checks - specified via <literal>OCF_CHECK_LEVEL</literal>. + ]]> - +
- Disabling a Monitor Operation - - The easiest way to stop a recurring monitor is to just delete it. - However, there can be times when you only want to disable it temporarily. - In such cases, simply add enabled="false" to the operation's definition. - - - Example of an OCF resource with a disabled health check - + Disabling a Monitor Operation + + The easiest way to stop a recurring monitor is to just delete it. + However, there can be times when you only want to disable it temporarily. + In such cases, simply add enabled="false" to the operation's definition. + + + Example of an OCF resource with a disabled health check + ]]> - - This can be achieved from the command-line by executing - cibadmin -M -X ‘<op id="public-ip-check" enabled="false"/>' - Once you've done whatever you needed to do, you can then re-enable it with - cibadmin -M -X ‘<op id="public-ip-check" enabled="true"/>' + + This can be achieved from the command-line by executing + cibadmin -M -X ‘<op id="public-ip-check" enabled="false"/>' + Once you've done whatever you needed to do, you can then re-enable it with + cibadmin -M -X ‘<op id="public-ip-check" enabled="true"/>'
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Rules.xml b/doc/Pacemaker_Explained/en-US/Ch-Rules.xml index 380a7e664b..b8c3050b78 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Rules.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Rules.xml @@ -1,463 +1,463 @@ Rules Rules can be used to make your configuration more dynamic. One common example is to set one value for resource-stickiness during working hours, to prevent resources from being moved back to their most preferred location, and another on weekends when no-one is around to notice an outage. Another use of rules might be to assign machines to different processing groups (using a node attribute) based on time and to then use that attribute when creating location constraints. Each rule can contain a number of expressions, date-expressions and even other rules. The results of the expressions are combined based on the rule's boolean-op field to determine if the rule ultimately evaluates to true or false. What happens next depends on the context in which the rule is being used. Properties of a Rule Field Description - - + + role Rule Property RulePropertiesrole role Limits the rule to apply only when the resource is in that role. Allowed values: Started, Slave, and Master. NOTE: A rule with role="Master" can not determine the initial location of a clone instance. It will only affect which of the active instances will be promoted. scoreRule Property RulePropertiesscore score The score to apply if the rule evaluates to true. Limited to use in rules that are part of location constraints. score-attribute Rule Property RulePropertiesscore-attribute score-attribute The node attribute to look up and use as a score if the rule evaluates to true. Limited to use in rules that are part of location constraints. boolean-op Rule Property RulePropertiesboolean-op boolean-op How to combine the result of multiple expression objects. Allowed values: and and or. - - + +
<indexterm significance="preferred"><primary>Node</primary><secondary>Attribute Expressions</secondary></indexterm>Node Attribute Expressions Expression objects are used to control a resource based on the attributes defined by a node or nodes. In addition to any attributes added by the administrator, each node has a built-in node attribute called #uname that can also be used. - Properties of an Expression - + Properties of an Expression + Field Description value Expression Property Expression Propertiesvalue value User supplied value for comparison attribute Expression Property Expression Propertiesattribute attribute The node attribute to test typeExpression Property Expression Propertiestype type Determines how the value(s) should be tested. Allowed values: string, integer, version operation Expression Property Expression Propertiesoperation operation - The comparison to perform. Allowed values: - + The comparison to perform. Allowed values: + lt - True if the node attribute's value is less than value gt - True if the node attribute's value is greater than value lte - True if the node attribute's value is less than or equal to value gte - True if the node attribute's value is greater than or equal to value eq - True if the node attribute's value is equal to value ne - True if the node attribute's value is not equal to value defined - True if the node has the named attribute not_defined - True if the node does not have the named attribute - + - - + +
<indexterm significance="preferred"><primary>Time Based Expressions</primary></indexterm> <indexterm significance="preferred"><primary>Expression</primary><secondary>Time/Date Based</secondary></indexterm> Time/Date Based Expressions - As the name suggests, date_expressions are used to control a resource or cluster option based on the current date/time. - They can contain an optional date_spec and/or duration object depending on the context. + As the name suggests, date_expressions are used to control a resource or cluster option based on the current date/time. + They can contain an optional date_spec and/or duration object depending on the context. - Properties of a Date Expression - + Properties of a Date Expression + Field Description start A date/time conforming to the ISO8601 specification. end A date/time conforming to the ISO8601 specification. Can be inferred by supplying a value for start and a duration. operation - Compares the current date/time with the start and/or end date, depending on the context. Allowed values: - + Compares the current date/time with the start and/or end date, depending on the context. Allowed values: + gt - True if the current date/time is after start lt - True if the current date/time is before end in-range - True if the current date/time is after start and before end date-spec - performs a cron-like comparison to the current date/time - + - - + +
Because the comparisons (except for date_spec) include the time, the eq, neq, gte and lte operators have not been implemented.
<indexterm significance="preferred"><primary>Date Specifications</primary></indexterm> Date Specifications - - date_spec objects are used to create cron-like expressions relating to time. - Each field can contain a single number or a single range. - Instead of defaulting to zero, any field not supplied is ignored. - - - For example, monthdays="1" matches the first day of every month and hours="09-17" matches the hours between 9am and 5pm (inclusive). - However, at this time one cannot specify weekdays="1,2" or weekdays="1-2,5-6" since they contain multiple ranges. - Depending on demand, this may be implemented in a future release. - - - Properties of a Date Spec - - - + + date_spec objects are used to create cron-like expressions relating to time. + Each field can contain a single number or a single range. + Instead of defaulting to zero, any field not supplied is ignored. + + + For example, monthdays="1" matches the first day of every month and hours="09-17" matches the hours between 9am and 5pm (inclusive). + However, at this time one cannot specify weekdays="1,2" or weekdays="1-2,5-6" since they contain multiple ranges. + Depending on demand, this may be implemented in a future release. + +
+ Properties of a Date Spec + + + - Field - Description + Field + Description - - + + idDate Spec Property Date Spec Propertiesid id - A unique name for the date + A unique name for the date hours Date Spec Property Date Spec Propertieshours hours - Allowed values: 0-23 + Allowed values: 0-23 monthdays Date Spec Property Date Spec Propertiesmonthdays monthdays - Allowed values: 0-31 (depending on month and year) + Allowed values: 0-31 (depending on month and year) weekdays Date Spec Property Date Spec Propertiesweekdays weekdays - Allowed values: 1-7 (1=Monday, 7=Sunday) + Allowed values: 1-7 (1=Monday, 7=Sunday) yeardays Date Spec Property Date Spec Propertiesyeardays yeardays - Allowed values: 1-366 (depending on the year) + Allowed values: 1-366 (depending on the year) months Date Spec Property Date Spec Propertiesmonths months - Allowed values: 1-12 + Allowed values: 1-12 weeks Date Spec Property Date Spec Propertiesweeks weeks - Allowed values: 1-53 (depending on weekyear) + Allowed values: 1-53 (depending on weekyear) years Date Spec Property Date Spec Propertiesyears years - Year according the Gregorian calendar + Year according the Gregorian calendar weekyears Date Spec Property Date Spec Propertiesweekyears weekyears - - May differ from Gregorian years; Eg. 2005-001 Ordinal is also 2005-01-01 Gregorian is also 2004-W53-6 Weekly - + + May differ from Gregorian years; Eg. 2005-001 Ordinal is also 2005-01-01 Gregorian is also 2004-W53-6 Weekly + moon Date Spec Property Date Spec Propertiesmoon moon - Allowed values: 0-7 (0 is new, 4 is full moon). Seriously, you can use this. This was implemented to demonstrate the ease with which new comparisons could be added. + Allowed values: 0-7 (0 is new, 4 is full moon). Seriously, you can use this. This was implemented to demonstrate the ease with which new comparisons could be added. - - -
+ + +
<indexterm significance="preferred"><primary>Durations Expressions</primary></indexterm> <indexterm significance="preferred"><primary>Expressions</primary><secondary>Durations</secondary></indexterm> Durations - - Durations are used to calculate a value for end when one is not supplied to in_range operations. - They contain the same fields as date_spec objects but without the limitations (ie. you can have a duration of 19 months). - Like date_specs, any field not supplied is ignored. - -
- Sample Time Based Expressions - - True if now is any time in the year 2005 - + + Durations are used to calculate a value for end when one is not supplied to in_range operations. + They contain the same fields as date_spec objects but without the limitations (ie. you can have a duration of 19 months). + Like date_specs, any field not supplied is ignored. + +
+ Sample Time Based Expressions + + True if now is any time in the year 2005 + ]]> - - - Equivalent expression. - + + + Equivalent expression. + ]]> - - - 9am-5pm, Mon-Friday - + + + 9am-5pm, Mon-Friday + ]]> - + Please note that the 16 matches up to 16:59:59, as the numeric value (hour) still matches! - - 9am-6pm, Mon-Friday, or all day saturday - + + 9am-6pm, Mon-Friday, or all day saturday + ]]> - - - 9am-5pm or 9pm-12pm, Mon-Friday - + + + 9am-5pm or 9pm-12pm, Mon-Friday + ]]> - - - Mondays in March 2005 - + + + Mondays in March 2005 + ]]> - - NOTE: Because no time is specified, 00:00:00 is implied. - This means that the range includes all of 2005-03-01 but none of 2005-04-01. - You may wish to write end="2005-03-31T23:59:59" to avoid confusion. - - A full moon on Friday the 13th - + + NOTE: Because no time is specified, 00:00:00 is implied. + This means that the range includes all of 2005-03-01 but none of 2005-04-01. + You may wish to write end="2005-03-31T23:59:59" to avoid confusion. + + A full moon on Friday the 13th + ]]> - -
+
+
<indexterm significance="preferred"><primary>Rule</primary><secondary>Determine Resource Location</secondary></indexterm> <indexterm><primary>Resource</primary><secondary>Location, Determine by Rules</secondary></indexterm> Using Rules to Determine Resource Location - If the constraint's outer-most rule evaluates to false, the cluster treats the constraint as if it was not there. - When the rule evaluates to true, the node's preference for running the resource is updated with the score associated with the rule. + If the constraint's outer-most rule evaluates to false, the cluster treats the constraint as if it was not there. + When the rule evaluates to true, the node's preference for running the resource is updated with the score associated with the rule. - If this sounds familiar, its because you have been using a simplified syntax for location constraint rules already. - Consider the following location constraint: + If this sounds familiar, its because you have been using a simplified syntax for location constraint rules already. + Consider the following location constraint: Prevent myApacheRsc from running on c001n03 <rsc_location id="dont-run-apache-on-c001n03" rsc="myApacheRsc" score="-INFINITY" node="c001n03"/> This constraint can be more verbosely written as: - Prevent myApacheRsc from running on c001n03 - expanded version - + Prevent myApacheRsc from running on c001n03 - expanded version + ]]> The advantage of using the expanded form is that one can then add extra clauses to the rule, such as limiting the rule such that it only applies during certain times of the day or days of the week (this is discussed in subsequent sections). - It also allows us to match on node properties other than its name. - If we rated each machine's CPU power such that the cluster had the following nodes section: + It also allows us to match on node properties other than its name. + If we rated each machine's CPU power such that the cluster had the following nodes section: - A sample nodes section for use with score-attribute - + A sample nodes section for use with score-attribute + ]]> then we could prevent resources from running on underpowered machines with the rule ]]>
- Using <literal>score-attribute</literal> Instead of <literal>score</literal> - - When using score-attribute instead of score, each node matched by the rule has its score adjusted differently, according to its value for the named node attribute. - Thus, in the previous example, if a rule used score-attribute="cpu_mips", c001n01 would have its preference to run the resource increased by 1234 whereas c001n02 would have its preference increased by 5678. - + Using <literal>score-attribute</literal> Instead of <literal>score</literal> + + When using score-attribute instead of score, each node matched by the rule has its score adjusted differently, according to its value for the named node attribute. + Thus, in the previous example, if a rule used score-attribute="cpu_mips", c001n01 would have its preference to run the resource increased by 1234 whereas c001n02 would have its preference increased by 5678. +
Using Rules to Control Resource Options Often some cluster nodes will be different from their peers; sometimes these differences (the location of a binary or the names of network interfaces) require resources to be configured differently depending on the machine they're hosted on. By defining multiple instance_attributes objects for the resource and adding a rule to each, we can easily handle these special cases. In the example below, mySpecialRsc will use eth1 and port 9999 when run on node1, eth2 and port 8888 on node2 and default to eth0 and port 9999 for all other nodes. - Defining different resource options based on the node name - + Defining different resource options based on the node name + ]]> - The order in which instance_attributes objects are evaluated is determined by their score (highest to lowest). - If not supplied, score defaults to zero and objects with an equal score are processed in listed order. - If the instance_attributes object does not have a rule or has a rule that evaluates to true, then for any parameter the resource does not yet have a value for, the resource will use the parameter values defined by the instance_attributes object. + The order in which instance_attributes objects are evaluated is determined by their score (highest to lowest). + If not supplied, score defaults to zero and objects with an equal score are processed in listed order. + If the instance_attributes object does not have a rule or has a rule that evaluates to true, then for any parameter the resource does not yet have a value for, the resource will use the parameter values defined by the instance_attributes object.
<indexterm><primary>Rule</primary><secondary>Controlling Cluster Options</secondary></indexterm> <indexterm><primary>Cluster Options</primary><secondary>Controlled by Rules</secondary></indexterm> Using Rules to Control Cluster Options Controlling cluster options is achieved in much the same manner as specifying different resource options on different nodes. - The difference is that because they are cluster options, one cannot (or should not, because they won't work) use attribute based expressions. - The following example illustrates how to set a different resource-stickiness value during and outside of work hours. - This allows resources to automatically move back to their most preferred hosts, but at a time that (in theory) does not interfere with business activities. + The difference is that because they are cluster options, one cannot (or should not, because they won't work) use attribute based expressions. + The following example illustrates how to set a different resource-stickiness value during and outside of work hours. + This allows resources to automatically move back to their most preferred hosts, but at a time that (in theory) does not interfere with business activities. - Change <literal>resource-stickiness</literal> during working hours - + Change <literal>resource-stickiness</literal> during working hours + ]]>
Ensuring Time Based Rules Take Effect - A Pacemaker cluster is an event driven system. - As such, it won't recalculate the best place for resources to run in unless something (like a resource failure or configuration change) happens. - This can mean that a location constraint that only allows resource X to run between 9am and 5pm is not enforced. + A Pacemaker cluster is an event driven system. + As such, it won't recalculate the best place for resources to run in unless something (like a resource failure or configuration change) happens. + This can mean that a location constraint that only allows resource X to run between 9am and 5pm is not enforced. - If you rely on time based rules, it is essential that you set the cluster-recheck-interval option. - This tells the cluster to periodically recalculate the ideal state of the cluster. - For example, if you set cluster-recheck-interval=5m, then sometime between 9:00 and 9:05 the cluster would notice that it needs to start resource X, and between 17:00 and 17:05 it would realize that X needed to be stopped. + If you rely on time based rules, it is essential that you set the cluster-recheck-interval option. + This tells the cluster to periodically recalculate the ideal state of the cluster. + For example, if you set cluster-recheck-interval=5m, then sometime between 9:00 and 9:05 the cluster would notice that it needs to start resource X, and between 17:00 and 17:05 it would realize that X needed to be stopped. Note that the timing of the actual start and stop actions depends on what else needs to be performed first.
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Status.xml b/doc/Pacemaker_Explained/en-US/Ch-Status.xml index 1c14919420..682862f9a1 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Status.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Status.xml @@ -1,335 +1,335 @@ Status - Here be dragons Most users never need to understand the contents of the status section and can be happy with the output from crm_mon. However for those with a curious inclination, this section attempts to provide an overview of its contents.
<indexterm significance="preferred"><primary>Node</primary><secondary>Status</secondary></indexterm> <indexterm significance="preferred"><primary>Status of a Node</primary></indexterm> Node Status In addition to the cluster's configuration, the CIB holds an up-to-date representation of each cluster node in the status section.
- A bare-bones status entry for a healthy node called <literal>cl-virt-1</literal> - + A bare-bones status entry for a healthy node called <literal>cl-virt-1</literal> + ]]>
- Users are highly recommended not to modify any part of a node's state directly. - The cluster will periodically regenerate the entire section from authoritative sources. - So any changes should be done with the tools for those subsystems. + Users are highly recommended not to modify any part of a node's state directly. + The cluster will periodically regenerate the entire section from authoritative sources. + So any changes should be done with the tools for those subsystems. - Authoritative Sources for State Information - + Authoritative Sources for State Information + Dataset Authoritative Source node_state fields crmd transient_attributes tag attrd lrm tag lrmd
- The fields used in the node_state objects are named as they are largely for historical reasons and are rooted in Pacemaker's origins as the Heartbeat resource manager. - They have remained unchanged to preserve compatibility with older versions. + The fields used in the node_state objects are named as they are largely for historical reasons and are rooted in Pacemaker's origins as the Heartbeat resource manager. + They have remained unchanged to preserve compatibility with older versions. - Node Status Fields - + Node Status Fields + Field Description idNode Status Field NodeStatus Fieldid id Unique identifier for the node. Corosync based clusters use the uname of the machine, Heartbeat clusters use a human-readable (but annoying) UUID. uname Node Status Field NodeStatus Fielduname uname The node's machine name (output from uname -n). ha Node Status Field NodeStatus Fieldha ha Flag specifying whether the cluster software is active on the node. Allowed values: active, dead. in_ccm Node Status Field NodeStatus Fieldin_ccm in_ccm Flag for cluster membership; allowed values: true, false. crmd Node Status Field NodeStatus Fieldcrmd crmd Flag: is the crmd process active on the node? One of online, offline. join Node Status Field NodeStatus Fieldjoin join Flag saying whether the node participates in hosting resources. Possible values: down, pending, member, banned. expected Node Status Field NodeStatus Fieldexpected expected Expected value for join. crm-debug-origin Node Status Field NodeStatus Fieldcrm-debug-origin crm-debug-origin Diagnostic indicator: the origin of the most recent change(s).
The cluster uses these fields to determine if, at the node level, the node is healthy or is in a failed state and needs to be fenced.
Transient Node Attributes - Like regular node attributes, the name/value pairs listed here also help to describe the node. - However they are forgotten by the cluster when the node goes offline. - This can be useful, for instance, when you want a node to be in standby mode (not able to run resources) until the next reboot. + Like regular node attributes, the name/value pairs listed here also help to describe the node. + However they are forgotten by the cluster when the node goes offline. + This can be useful, for instance, when you want a node to be in standby mode (not able to run resources) until the next reboot. In addition to any values the administrator sets, the cluster will also store information about failed resources here.
- Example set of transient node attributes for node "cl-virt-1" - + Example set of transient node attributes for node "cl-virt-1" + ]]>
In the above example, we can see that the pingd:0 resource has failed once, at Mon Apr 6 11:22:22 2009 You can use the standard date command to print a human readable of any seconds-since-epoch value: - # date -d @number - . - We also see that the node is connected to three "pingd" peers and that all known resources have been checked for on this machine (probe_complete). + # date -d @number + . + We also see that the node is connected to three "pingd" peers and that all known resources have been checked for on this machine (probe_complete).
<indexterm significance="preferred"><primary>Operation History</primary></indexterm> Operation History - A node's resource history is held in the lrm_resources tag (a child of the lrm tag). - The information stored here includes enough information for the cluster to stop the resource safely if it is removed from the configuration section. - Specifically the resource's id, class, type and provider are stored. + A node's resource history is held in the lrm_resources tag (a child of the lrm tag). + The information stored here includes enough information for the cluster to stop the resource safely if it is removed from the configuration section. + Specifically the resource's id, class, type and provider are stored.
- A record of the apcstonith resource - <lrm_resource id="apcstonith" type="apcmastersnmp" class="stonith"> - + A record of the apcstonith resource + <lrm_resource id="apcstonith" type="apcmastersnmp" class="stonith"> +
- Additionally, we store the last job for every combination of resource, action and interval. - The concatenation of the values in this tuple are used to create the id of the lrm_rsc_op object. + Additionally, we store the last job for every combination of resource, action and interval. + The concatenation of the values in this tuple are used to create the id of the lrm_rsc_op object. - Contents of an <literal>lrm_rsc_op</literal> job. - - - + Contents of an <literal>lrm_rsc_op</literal> job. + + + Field Description idJob Field Job Fieldid id Identifier for the job constructed from the resource's id, operation and interval. call-id Job Field Job Fieldcall-id call-id The job's ticket number. Used as a sort key to determine the order in which the jobs were executed. operation Job Field Job Fieldoperation operation The action the resource agent was invoked with. interval Job Field Job Fieldinterval interval The frequency, in milliseconds, at which the operation will be repeated. A one-off job is indicated by 0. op-status Job Field Job Fieldop-status op-status The job's status. Generally this will be either 0 (done) or -1 (pending). Rarely used in favor of rc-code. rc-code Job Field Job Fieldrc-code rc-code The job's result. Refer to for details on what the values here mean and how they are interpreted. last-run Job Field Job Fieldlast-run last-run Diagnostic indicator. Machine local date/time, in seconds since epoch, at which the job was executed. last-rc-change Job Field Job Fieldlast-rc-change last-rc-change Diagnostic indicator. Machine local date/time, in seconds since epoch, at which the job first returned the current value of rc-code. exec-time Job Field Job Fieldexec-time exec-time Diagnostic indicator. Time, in milliseconds, that the job was running for. queue-time Job Field Job Fieldqueue-time queue-time Diagnostic indicator. Time, in seconds, that the job was queued for in the LRMd. crm_feature_set Job Field Job Fieldcrm_feature_set crm_feature_set The version which this job description conforms to. Used when processing op-digest. transition-key Job Field Job Fieldtransition-key transition-key A concatenation of the job's graph action number, the graph number, the expected result and the UUID of the crmd instance that scheduled it. This is used to construct transition-magic (below). transition-magic Job Field Job Fieldtransition-magic transition-magic A concatenation of the job's op-status, rc-code and transition-key. Guaranteed to be unique for the life of the cluster (which ensures it is part of CIB update notifications) and contains all the information needed for the crmd to correctly analyze and process the completed job. Most importantly, the decomposed elements tell the crmd if the job entry was expected and whether it failed. op-digest Job Field Job Fieldop-digest op-digest An MD5 sum representing the parameters passed to the job. Used to detect changes to the configuration, to restart resources if necessary. crm-debug-origin Job Field Job Fieldcrm-debug-origin crm-debug-origin Diagnostic indicator. The origin of the current values. - - + +
- Simple Example -
- A monitor operation (determines current state of the apcstonith resource) - + Simple Example +
+ A monitor operation (determines current state of the apcstonith resource) + ]]> -
- - In the above example, the job is a non-recurring monitor operation often referred to as a "probe" for the apcstonith resource. - The cluster schedules probes for every configured resource on when a new node starts, in order to determine the resource's current state before it takes any further action. - - - From the transition-key, we can see that this was the 22nd action of the 2nd graph produced by this instance of the crmd (2668bbeb-06d5-40f9-936d-24cb7f87006a). - The third field of the transition-key contains a 7, this indicates that the job expects to find the resource inactive. - By looking at the rc-code property, we see that this was the case. - - As that is the only job recorded for this node we can conclude that the cluster started the resource elsewhere. +
+ + In the above example, the job is a non-recurring monitor operation often referred to as a "probe" for the apcstonith resource. + The cluster schedules probes for every configured resource on when a new node starts, in order to determine the resource's current state before it takes any further action. + + + From the transition-key, we can see that this was the 22nd action of the 2nd graph produced by this instance of the crmd (2668bbeb-06d5-40f9-936d-24cb7f87006a). + The third field of the transition-key contains a 7, this indicates that the job expects to find the resource inactive. + By looking at the rc-code property, we see that this was the case. + + As that is the only job recorded for this node we can conclude that the cluster started the resource elsewhere.
- Complex Resource History Example -
- Resource history of a pingd clone with multiple jobs + Complex Resource History Example +
+ Resource history of a pingd clone with multiple jobs - ]]> -
- - When more than one job record exists, it is important to first sort them by call-id before interpreting them. - Once sorted, the above example can be summarized as: - - A non-recurring monitor operation returning 7 (not running), with a call-id of 3 - A stop operation returning 0 (success), with a call-id of 32 - A start operation returning 0 (success), with a call-id of 33 - A recurring monitor returning 0 (success), with a call-id of 34 - - - - The cluster processes each job record to build up a picture of the resource's state. - After the first and second entries, it is considered stopped and after the third it considered active. - Based on the last operation, we can tell that the resource is currently active. - - - Additionally, from the presence of a stop operation with a lower call-id than that of the start operation, we can conclude that the resource has been restarted. - Specifically this occurred as part of actions 11 and 31 of transition 11 from the crmd instance with the key 2668bbeb.... - This information can be helpful for locating the relevant section of the logs when looking for the source of a failure. - +
+ + When more than one job record exists, it is important to first sort them by call-id before interpreting them. + Once sorted, the above example can be summarized as: + + A non-recurring monitor operation returning 7 (not running), with a call-id of 3 + A stop operation returning 0 (success), with a call-id of 32 + A start operation returning 0 (success), with a call-id of 33 + A recurring monitor returning 0 (success), with a call-id of 34 + + + + The cluster processes each job record to build up a picture of the resource's state. + After the first and second entries, it is considered stopped and after the third it considered active. + Based on the last operation, we can tell that the resource is currently active. + + + Additionally, from the presence of a stop operation with a lower call-id than that of the start operation, we can conclude that the resource has been restarted. + Specifically this occurred as part of actions 11 and 31 of transition 11 from the crmd instance with the key 2668bbeb.... + This information can be helpful for locating the relevant section of the logs when looking for the source of a failure. +
diff --git a/doc/Pacemaker_Explained/en-US/Ch-Stonith.xml b/doc/Pacemaker_Explained/en-US/Ch-Stonith.xml index b908562ef9..1ffa5575d2 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Stonith.xml +++ b/doc/Pacemaker_Explained/en-US/Ch-Stonith.xml @@ -1,155 +1,155 @@ Protecting Your Data - STONITH
Why You Need STONITH STONITH is an acronym for Shoot-The-Other-Node-In-The-Head; its purpose is to protect your data from being corrupted by rogue nodes or concurrent access. - When a node is unresponsive it might still access your data. - The only way to be 100% sure that your data is safe, is to use STONITH, so we can be certain that the node is truly offline, before allowing the data to be accessed from another node. + When a node is unresponsive it might still access your data. + The only way to be 100% sure that your data is safe, is to use STONITH, so we can be certain that the node is truly offline, before allowing the data to be accessed from another node. - STONITH also has a role to play in the event that a clustered service cannot be stopped. - In this case, the cluster uses STONITH to force the whole node offline, thereby making it safe to start the service elsewhere. + STONITH also has a role to play in the event that a clustered service cannot be stopped. + In this case, the cluster uses STONITH to force the whole node offline, thereby making it safe to start the service elsewhere.
What STONITH Device Should You Use It is crucial that the STONITH device can allow the cluster to differentiate between a node and a network failure. - The biggest mistake people make in choosing a STONITH device is to use a remote power switch (such as many on-board IPMI controllers) that shares power with the node it controls. - In such cases, the cluster cannot be sure if the node is really offline, or active and suffering from a network fault. + The biggest mistake people make in choosing a STONITH device is to use a remote power switch (such as many on-board IPMI controllers) that shares power with the node it controls. + In such cases, the cluster cannot be sure if the node is really offline, or active and suffering from a network fault. Likewise, any device that relies on the machine being active (such as SSH-based "devices" used during testing) are inappropriate.
Configuring STONITH - + Find the correct driver: stonith_admin --list-installed - - + + Since every device is different, the parameters needed to configure it will vary. To find out which parameters the device supports resp. needs, run: stonith_admin --metadata --agent type - The output should be XML formatted text containing additional parameter descriptions. We + The output should be XML formatted text containing additional parameter descriptions. We will endeavour to make the output more friendly in a later version. - - + + Create a file called stonith.xml containing a primitive resource with a class of stonith, a type of type and a parameter for each of the values returned in step 2. If the device does not know how to fence nodes based on their uname, you may also need to set the special pcmk_host_map parameter. See man stonithd for details. If the device does not support the list command, you may also need to set the special pcmk_host_list and/or pcmk_host_check parameters. See man stonithd for details. If the device does not expect the victim to be specified with the port parameter, you may also need to set the special pcmk_host_argument parameter. See man stonithd for details. - + Upload it into the CIB using cibadmin: cibadmin -C -o resources --xml-file stonith.xml Once the stonith resource is running, you can test it by executing: stonith_admin --reboot nodename. Although you might want to stop the cluster on that machine first.
- Example - Assuming we have an chassis containing four nodes and an IPMI device active on 10.0.0.1, then + Example + Assuming we have an chassis containing four nodes and an IPMI device active on 10.0.0.1, then we would chose the fence_ipmilan driver in step 2 and obtain the following list of parameters: -
- Obtaining a list of STONITH Parameters +
+ Obtaining a list of STONITH Parameters # stonith_admin --metadata -a fence_ipmilan fence_ipmilan is an I/O Fencing agent which can be used with machines controlled by IPMI. This agent calls support software using ipmitool (http://ipmitool.sf.net/). To use fence_ipmilan with HP iLO 3 you have to enable lanplus option (lanplus / -P) and increase wait after operation to 4 seconds (power_wait=4 / -T 4) IPMI Lan Auth type (md5, password, or none) IPMI Lan IP to talk to Password to control power on IPMI device Script to retrieve password (if required) Use Lanplus Username/Login to control IPMI device Operation to perform. Valid operations: on, off, reboot, status, list, diag, monitor or metadata Timeout (sec) for IPMI operation Ciphersuite to use (same as ipmitool -C parameter) Method to fence (onoff or cycle) Wait X seconds after on/off operation Wait X seconds before fencing is started Verbose mode - - - + + + ]]> -
- From this list we would create a STONITH resource fragment that might look like this: - - Sample STONITH Resource - +
+ From this list we would create a STONITH resource fragment that might look like this: + + Sample STONITH Resource + ]]> - + The monitor interval of two hours is explained by bugs in some IPMI implementations; see Monitoring the fencing devices.
diff --git a/doc/Pacemaker_Explained/en-US/NOTES b/doc/Pacemaker_Explained/en-US/NOTES index 7782aefee8..ae5069b559 100644 --- a/doc/Pacemaker_Explained/en-US/NOTES +++ b/doc/Pacemaker_Explained/en-US/NOTES @@ -1,65 +1,69 @@ That's a "+", not a hyphen: Key combinations can be distinguished from keycaps by the hyphen connecting each part of a key combination. For example: Press Enter to execute the command. Press Ctrl+Alt+F2 to switch to the first virtual terminal. Press Ctrl+Alt+F1 to return to your X-Windows session. doesn't apply here: If source code is discussed, class names, methods, functions, v including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. 1.2 terminal output has page-break 2.3 editing via VI isn't that racy? Are concurrent changes detected? why sometimes and sometimes
? example 2.2 has title at top, different to the figures 2.8 header slightly too long, line broken some are in , some in ... I'd like the latter more, or perhaps in a . Indentation makes whitespace at start of lines ... remove? +Chapter 3 +========= +- table 3.3 "Properties maintained by the Cluster" incomplete (crm-feature-set, ...) + 4.4.2 structure different from 4.4.1 ... numbered lists 5.3 Notes have next content overlaid ex 5.6: 1.0 ???? perhaps use 10.20.30.40 instead of the 1.2.3.4 example IP address? 6.5 images/resource-set.png missing, "images/two-sets.png" too; images/three-sets; "images/three-sets-complex.png" Ch 7 missing? Remove Ex9.9? collocate or colocate? Eg. in C.1: Multi-dimensional colocation and ordering constraints. See Section 6.5, “Ordering Sets of Resources” and Section 6.6, “Collocating Sets of Resources” Ap-Debug.xml not used? alias for primary? diff --git a/doc/Pacemaker_Explained/en-US/Revision_History.xml b/doc/Pacemaker_Explained/en-US/Revision_History.xml index 9df727a79b..b3b43ea2d9 100644 --- a/doc/Pacemaker_Explained/en-US/Revision_History.xml +++ b/doc/Pacemaker_Explained/en-US/Revision_History.xml @@ -1,33 +1,33 @@ Revision History 1 19 Oct 2009 - AndrewBeekhofandrew@beekhof.net - Import from Pages.app + AndrewBeekhofandrew@beekhof.net + Import from Pages.app 2 26 Oct 2009 - AndrewBeekhofandrew@beekhof.net - Cleanup and reformatting of docbook xml complete + AndrewBeekhofandrew@beekhof.net + Cleanup and reformatting of docbook xml complete - 3 - Tue Nov 12 2009 - AndrewBeekhofandrew@beekhof.net - - - Split book into chapters and pass validation - Re-organize book for use with Publican - - + 3 + Tue Nov 12 2009 + AndrewBeekhofandrew@beekhof.net + + + Split book into chapters and pass validation + Re-organize book for use with Publican + + diff --git a/doc/Pacemaker_Explained/pot/Ch-Options.pot b/doc/Pacemaker_Explained/pot/Ch-Options.pot index f05dfb2e8d..9d614a581a 100644 --- a/doc/Pacemaker_Explained/pot/Ch-Options.pot +++ b/doc/Pacemaker_Explained/pot/Ch-Options.pot @@ -1,495 +1,485 @@ # # AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: 0\n" "POT-Creation-Date: 2012-02-27T09:17:56\n" "PO-Revision-Date: 2012-02-27T09:17:56\n" "Last-Translator: Automatically generated\n" "Language-Team: None\n" "MIME-Version: 1.0\n" "Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title #, no-c-format msgid "Cluster Options" msgstr "" #. Tag: title #, no-c-format msgid "Special Options" msgstr "" #. Tag: para #, no-c-format msgid " Special Cluster Options Cluster OptionsSpecial Options Special Options " msgstr "" #. Tag: para #, no-c-format msgid "The reason for these fields to be placed at the top level instead of with the rest of cluster options is simply a matter of parsing. These options are used by the configuration database which is, by design, mostly ignorant of the content it holds. So the decision was made to place them in an easy to find location." msgstr "" #. Tag: title #, no-c-format msgid "Configuration Version" msgstr "" #. Tag: para #, no-c-format msgid " Configuration VersionCluster Option Cluster Option Cluster OptionsConfiguration Version Configuration Version " msgstr "" #. Tag: para #, no-c-format msgid "When a node joins the cluster, the cluster will perform a check to see who has the best configuration based on the fields below. It then asks the node with the highest (admin_epoch, epoch, num_updates) tuple to replace the configuration on all the nodes - which makes setting them, and setting them correctly, very important." msgstr "" #. Tag: title #, no-c-format msgid "Configuration Version Properties" msgstr "" #. Tag: entry #, no-c-format msgid "Field" msgstr "" #. Tag: entry #, no-c-format msgid "Description" msgstr "" #. Tag: para #, no-c-format msgid "admin_epoch" msgstr "" #. Tag: para #, no-c-format msgid " admin_epoch Cluster Option Cluster Optionsadmin_epoch admin_epoch Never modified by the cluster. Use this to make the configurations on any inactive nodes obsolete." msgstr "" #. Tag: para #, no-c-format msgid "Never set this value to zero, in such cases the cluster cannot tell the difference between your configuration and the \"empty\" one used when nothing is found on disk." msgstr "" #. Tag: para #, no-c-format msgid "epoch" msgstr "" #. Tag: para #, no-c-format msgid " epoch Cluster Option Cluster Optionsepoch epoch Incremented every time the configuration is updated (usually by the admin)" msgstr "" #. Tag: para #, no-c-format msgid "num_updates" msgstr "" #. Tag: para #, no-c-format msgid " num_updates Cluster Option Cluster Optionsnum_updates num_updates Incremented every time the configuration or status is updated (usually by the cluster)" msgstr "" #. Tag: title #, no-c-format msgid "Other Fields" msgstr "" #. Tag: title #, no-c-format msgid "Properties Controlling Validation" msgstr "" #. Tag: para #, no-c-format msgid "validate-with" msgstr "" #. Tag: para #, no-c-format msgid " validate-with Cluster Option Cluster Optionsvalidate-with validate-with Determines the type of validation being done on the configuration. If set to \"none\", the cluster will not verify that updates conform to the DTD (nor reject ones that don’t). This option can be useful when operating a mixed version cluster during an upgrade." msgstr "" #. Tag: title #, no-c-format msgid "Fields Maintained by the Cluster" msgstr "" #. Tag: title #, no-c-format msgid "Properties Maintained by the Cluster" msgstr "" -#. Tag: para -#, no-c-format -msgid "crm-debug-origin" -msgstr "" - -#. Tag: para -#, no-c-format -msgid " crm-debug-origin Cluster Fields Cluster Fieldscrm-debug-origin crm-debug-origin Indicates where the last update came from. Informational purposes only." -msgstr "" - #. Tag: para #, no-c-format msgid "cib-last-written" msgstr "" #. Tag: para #, no-c-format msgid " cib-last-written Cluster Fields Cluster Fieldscib-last-written cib-last-written Indicates when the configuration was last written to disk. Informational purposes only." msgstr "" #. Tag: para #, no-c-format msgid "dc-uuid" msgstr "" #. Tag: para #, no-c-format msgid " dc-uuid Cluster Fields Cluster Fieldsdc-uuid dc-uuid Indicates which cluster node is the current leader. Used by the cluster when placing resources and determining the order of some events." msgstr "" #. Tag: para #, no-c-format msgid "have-quorum" msgstr "" #. Tag: para #, no-c-format msgid " have-quorum Cluster Fields Cluster Fieldshave-quorum have-quorum Indicates if the cluster has quorum. If false, this may mean that the cluster cannot start resources or fence other nodes. See no-quorum-policy below." msgstr "" #. Tag: para #, no-c-format msgid "Note that although these fields can be written to by the admin, in most cases the cluster will overwrite any values specified by the admin with the \"correct\" ones. To change the admin_epoch, for example, one would use:" msgstr "" #. Tag: para #, no-c-format msgid "cibadmin --modify --crm_xml ‘<cib admin_epoch=\"42\"/>'" msgstr "" #. Tag: para #, no-c-format msgid "A complete set of fields will look something like this:" msgstr "" #. Tag: programlisting #, no-c-format msgid "<cib have-quorum=\"true\" validate-with=\"pacemaker-1.0\"\n" " admin_epoch=\"1\" epoch=\"12\" num_updates=\"65\"\n" " dc-uuid=\"ea7d39f4-3b94-4cfa-ba7a-952956daabee\">" msgstr "" #. Tag: para #, no-c-format msgid "Cluster options, as you might expect, control how the cluster behaves when confronted with certain situations." msgstr "" #. Tag: para #, no-c-format msgid "They are grouped into sets and, in advanced configurations, there may be more than one. This will be described later in the section on <xref linkend=\"ch-rules\"/> where we will show how to have the cluster use different sets of options during working hours (when downtime is usually to be avoided at all costs) than it does during the weekends (when resources can be moved to the their preferred hosts without bothering end users) For now we will describe the simple case where each option is present at most once." msgstr "" #. Tag: title #, no-c-format msgid "Available Cluster Options" msgstr "" #. Tag: entry #, no-c-format msgid "Option" msgstr "" #. Tag: entry #, no-c-format msgid "Default" msgstr "" #. Tag: para #, no-c-format msgid "batch-limit" msgstr "" #. Tag: para #, no-c-format msgid "30" msgstr "" #. Tag: para #, no-c-format msgid " batch-limit Cluster Options Cluster Optionsbatch-limit batch-limit The number of jobs that the TE is allowed to execute in parallel. The \"correct\" value will depend on the speed and load of your network and cluster nodes." msgstr "" #. Tag: para #, no-c-format msgid "no-quorum-policy" msgstr "" #. Tag: para #, no-c-format msgid "stop" msgstr "" #. Tag: para #, no-c-format msgid " no-quorum-policy Cluster Options Cluster Optionsno-quorum-policy no-quorum-policy What to do when the cluster does not have quorum. Allowed values:" msgstr "" #. Tag: para #, no-c-format msgid "* ignore - continue all resource management * freeze - continue resource management, but don’t recover resources from nodes not in the affected partition * stop - stop all resources in the affected cluster partition * suicide - fence all nodes in the affected cluster partition" msgstr "" #. Tag: para #, no-c-format msgid "symmetric-cluster" msgstr "" #. Tag: para #, no-c-format msgid "TRUE" msgstr "" #. Tag: para #, no-c-format msgid " symmetric-cluster Cluster Options Cluster Optionssymmetric-cluster symmetric-cluster Can all resources run on any node by default?" msgstr "" #. Tag: para #, no-c-format msgid "stonith-enabled" msgstr "" #. Tag: para #, no-c-format msgid " stonith-enabled Cluster Options Cluster Optionsstonith-enabled stonith-enabled Should failed nodes and nodes with resources that can’t be stopped be shot? If you value your data, set up a STONITH device and enable this." msgstr "" #. Tag: para #, no-c-format msgid "If true, or unset, the cluster will refuse to start resources unless one or more STONITH resources have been configured also." msgstr "" #. Tag: para #, no-c-format msgid "stonith-action" msgstr "" #. Tag: para #, no-c-format msgid "reboot" msgstr "" #. Tag: para #, no-c-format msgid " stonith-action Cluster Options Cluster Optionsstonith-action stonith-action Action to send to STONITH device. Allowed values: reboot, poweroff." msgstr "" #. Tag: para #, no-c-format msgid "cluster-delay" msgstr "" #. Tag: para #, no-c-format msgid "60s" msgstr "" #. Tag: para #, no-c-format msgid " cluster-delay Cluster Options Cluster Optionscluster-delay cluster-delay Round trip delay over the network (excluding action execution). The \"correct\" value will depend on the speed and load of your network and cluster nodes." msgstr "" #. Tag: para #, no-c-format msgid "stop-orphan-resources" msgstr "" #. Tag: para #, no-c-format msgid " stop-orphan-resources Cluster Options Cluster Optionsstop-orphan-resources stop-orphan-resources Should deleted resources be stopped?" msgstr "" #. Tag: para #, no-c-format msgid "stop-orphan-actions" msgstr "" #. Tag: para #, no-c-format msgid " stop-orphan-actions Cluster Options Cluster Optionsstop-orphan-actions stop-orphan-actions Should deleted actions be cancelled?" msgstr "" #. Tag: para #, no-c-format msgid "start-failure-is-fatal" msgstr "" #. Tag: para #, no-c-format msgid " start-failure-is-fatal Cluster Options Cluster Optionsstart-failure-is-fatal start-failure-is-fatal When set to FALSE, the cluster will instead use the resource’s failcount and value for resource-failure-stickiness." msgstr "" #. Tag: para #, no-c-format msgid "pe-error-series-max" msgstr "" #. Tag: para #, no-c-format msgid "-1 (all)" msgstr "" #. Tag: para #, no-c-format msgid " pe-error-series-max Cluster Options Cluster Optionspe-error-series-max pe-error-series-max The number of PE inputs resulting in ERRORs to save. Used when reporting problems." msgstr "" #. Tag: para #, no-c-format msgid "pe-warn-series-max" msgstr "" #. Tag: para #, no-c-format msgid " pe-warn-series-max Cluster Options Cluster Optionspe-warn-series-max pe-warn-series-max The number of PE inputs resulting in WARNINGs to save. Used when reporting problems." msgstr "" #. Tag: para #, no-c-format msgid "pe-input-series-max" msgstr "" #. Tag: para #, no-c-format msgid " pe-input-series-max Cluster Options Cluster Optionspe-input-series-max pe-input-series-max The number of \"normal\" PE inputs to save. Used when reporting problems." msgstr "" #. Tag: para #, no-c-format msgid "You can always obtain an up-to-date list of cluster options, including their default values, by running the pengine metadata command." msgstr "" #. Tag: title #, no-c-format msgid "Querying and Setting Cluster Options" msgstr "" #. Tag: para #, no-c-format msgid " Querying Cluster Options Setting Cluster Options Cluster OptionsQuerying Querying Cluster OptionsSetting Setting " msgstr "" #. Tag: para #, no-c-format msgid "Cluster options can be queried and modified using the crm_attribute tool. To get the current value of cluster-delay, simply use:" msgstr "" #. Tag: para #, no-c-format msgid "crm_attribute --attr-name cluster-delay --get-value" msgstr "" #. Tag: para #, no-c-format msgid "which is more simply written as" msgstr "" #. Tag: para #, no-c-format msgid "crm_attribute --get-value -n cluster-delay" msgstr "" #. Tag: para #, no-c-format msgid "If a value is found, you’ll see a result like this:" msgstr "" #. Tag: para #, no-c-format msgid " # crm_attribute --get-value -n cluster-delay" msgstr "" #. Tag: literallayout #, no-c-format msgid "name=cluster-delay value=60s" msgstr "" #. Tag: para #, no-c-format msgid "However, if no value is found, the tool will display an error:" msgstr "" #. Tag: para #, no-c-format msgid "# crm_attribute --get-value -n clusta-deway" msgstr "" #. Tag: literallayout #, no-c-format msgid "name=clusta-deway value=(null)\n" "Error performing operation: The object/attribute does not exist" msgstr "" #. Tag: para #, no-c-format msgid "To use a different value, eg. 30, simply run:" msgstr "" #. Tag: para #, no-c-format msgid "crm_attribute --attr-name cluster-delay --attr-value 30s" msgstr "" #. Tag: para #, no-c-format msgid "To go back to the cluster’s default value you can delete the value, for example with this command:" msgstr "" #. Tag: para #, no-c-format msgid "crm_attribute --attr-name cluster-delay --delete-attr" msgstr "" #. Tag: title #, no-c-format msgid "When Options are Listed More Than Once" msgstr "" #. Tag: para #, no-c-format msgid "If you ever see something like the following, it means that the option you’re modifying is present more than once." msgstr "" #. Tag: title #, no-c-format msgid "Deleting an option that is listed twice" msgstr "" #. Tag: para #, no-c-format msgid "# crm_attribute --attr-name batch-limit --delete-attr" msgstr "" #. Tag: literallayout #, no-c-format msgid "Multiple attributes match name=batch-limit in crm_config:\n" "Value: 50 (set=cib-bootstrap-options, id=cib-bootstrap-options-batch-limit)\n" "Value: 100 (set=custom, id=custom-batch-limit)\n" "Please choose from one of the matches above and supply the 'id' with --attr-id" msgstr "" #. Tag: para #, no-c-format msgid "In such cases follow the on-screen instructions to perform the requested action. To determine which value is currently being used by the cluster, please refer to the section on <xref linkend=\"ch-rules\"/>." msgstr "" diff --git a/doc/Pacemaker_Explained/ro-RO/Ch-Options.po b/doc/Pacemaker_Explained/ro-RO/Ch-Options.po index 716257e852..0a2b9abdcb 100644 --- a/doc/Pacemaker_Explained/ro-RO/Ch-Options.po +++ b/doc/Pacemaker_Explained/ro-RO/Ch-Options.po @@ -1,500 +1,490 @@ msgid "" msgstr "" "Project-Id-Version: Pacemaker 1.1\n" "POT-Creation-Date: 2012-01-01T17:48:32\n" "PO-Revision-Date: 2012-01-01T17:48:32\n" "Last-Translator: Dan Frîncu \n" "Language-Team: None\n" "MIME-Version: 1.0\n" "Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title #, no-c-format msgid "Cluster Options" msgstr "Opţiunile Clusterului" #. Tag: title #, no-c-format msgid "Special Cluster Options Cluster OptionsSpecial Options Special Options" msgstr "Opțiunile Speciale ale Clusterului Opțiunile ClusteruluiOpțiuni Speciale Opțiuni Speciale" #. Tag: para #, no-c-format msgid "The reason for these fields to be placed at the top level instead of with the rest of cluster options is simply a matter of parsing. These options are used by the configuration database which is, by design, mostly ignorant of the content it holds. So the decision was made to place them in an easy to find location." msgstr "Motivul pentru care aceste câmpuri să fie plasate la nivelul cel mai înalt în loc să fie cu restul opţiunilor clusterului este pur şi simplu legat de parsare. Aceste opţiuni sunt folosite de către baza de date cu configuraţii care este, prin design, în principal ignorantă faţă de conţinutul pe care îl deţine. Aşa că decizia a fost luată de a le plasa într-o locaţie uşor de găsit." #. Tag: title #, no-c-format msgid "Configuration Version, Cluster Option Cluster OptionsConfiguration Version Configuration Version" msgstr "Versiunea Configurației, Opțiunea Clusterului Opțiunile ClusteruluiVersiunea Configurației Versiunea Configurației" #. Tag: para #, no-c-format msgid "When a node joins the cluster, the cluster will perform a check to see who has the best configuration based on the fields below. It then asks the node with the highest (admin_epoch, epoch, num_updates) tuple to replace the configuration on all the nodes - which makes setting them, and setting them correctly, very important." msgstr "Când un nod aderă la cluster, clusterul va efectua o verificare pentru a vedea cine are cea mai bună configuraţie bazată pe câmpurile de mai jos. Apoi întreabă nodul cu cea mai mare tuplă (admin_epoch, epoch, num_updates) să înlocuiască configuraţia pe toate nodurile - fapt care face setarea acestora şi setarea lor corectă, foarte importantă." #. Tag: title #, no-c-format msgid "Configuration Version Properties" msgstr "Proprietăţi ale Versiunii Configuraţiei" #. Tag: entry #, no-c-format msgid "Field" msgstr "Câmp" #. Tag: entry #, no-c-format msgid "Description" msgstr "Descriere" #. Tag: entry #, no-c-format msgid "admin_epoch Cluster Option Cluster Optionsadmin_epoch admin_epoch" msgstr "Opțiunea Clusterului admin_epoch Opțiunile Clusteruluiadmin_epoch admin_epoch" #. Tag: para #, no-c-format msgid "Never modified by the cluster. Use this to make the configurations on any inactive nodes obsolete." msgstr "Niciodată modificat de către cluster. Folosiţi acesta pentru a face configuraţiile pe nodurile inactive să fie învechite." #. Tag: para #, no-c-format msgid "Never set this value to zero, in such cases the cluster cannot tell the difference between your configuration and the \"empty\" one used when nothing is found on disk." msgstr "Nu setaţi niciodată această valoare la zero, în astfel de cazuri clusterul nu poate face diferenţa între configuraţia voastră şi cea \"goală\" folosită atunci când nu este găsit nimic pe disc." #. Tag: entry #, no-c-format msgid "epoch Cluster Option Cluster Optionsepoch epoch" msgstr "Opțiunea Clusterului epoch Opțiunile Clusteruluiepoch epoch" #. Tag: entry #, no-c-format msgid "Incremented every time the configuration is updated (usually by the admin)" msgstr "Incrementată de fiecare dată când configuraţia este actualizată (de obicei de către administrator)" #. Tag: entry #, no-c-format msgid "num_updates Cluster Option Cluster Optionsnum_updates num_updates" msgstr "Opțiunea Clusterului num_updates Opțiunile Clusteruluinum_updates num_updates" #. Tag: entry #, no-c-format msgid "Incremented every time the configuration or status is updated (usually by the cluster)" msgstr "Incrementată de fiecare dată când configuraţia sau statusul este actualizat (de obicei de către cluster)" #. Tag: title #, no-c-format msgid "Other Fields" msgstr "Alte Câmpuri" #. Tag: title #, no-c-format msgid "Properties Controlling Validation" msgstr "Proprietăţi care Controlează Validarea" #. Tag: entry #, no-c-format msgid "validate-with Cluster Option Cluster Optionsvalidate-with validate-with" msgstr "Opțiunea Clusterului validate-with Opțiunile Clusteruluivalidate-with validate-with" #. Tag: entry #, no-c-format msgid "Determines the type of validation being done on the configuration. If set to \"none\", the cluster will not verify that updates conform to the DTD (nor reject ones that don't). This option can be useful when operating a mixed version cluster during an upgrade." msgstr "Determină tipul de validare care este realizat pe configuraţie. Dacă este setat pe \"none\", clusterul nu va verifica dacă actualizările sunt conforme cu DTD (nici nu le va respinge pe cele care nu sunt). Această opţiune poate fi utilă când lucraţi cu o versiune combinată a clusterului în timpul unei actualizări." #. Tag: title #, no-c-format msgid "Fields Maintained by the Cluster" msgstr "Câmpuri Menţinute de către Cluster" #. Tag: title #, no-c-format msgid "Properties Maintained by the Cluster" msgstr "Proprietăţi Menţinute de către Cluster" -#. Tag: entry -#, no-c-format -msgid "crm-debug-origin Cluster Fields Cluster Fieldscrm-debug-origin crm-debug-origin" -msgstr "Câmpurile Clusterului crm-debug-origin Câmpurile Clusteruluicrm-debug-origin crm-debug-origin" - -#. Tag: entry -#, no-c-format -msgid "Indicates where the last update came from. Informational purposes only." -msgstr "Indică de unde a provenit ultima actualizare. Numai cu scop informaţional." - #. Tag: entry #, no-c-format msgid "cib-last-written Cluster Fields Cluster Fieldscib-last-written cib-last-written" msgstr "Câmpurile Clusterului cib-last-written Câmpurile Clusteruluicib-last-written cib-last-written" #. Tag: entry #, no-c-format msgid "Indicates when the configuration was last written to disk. Informational purposes only." msgstr "Indică momentul când configuraţia a fost scrisă ultima oară pe disc. Numai cu scop informaţional." #. Tag: entry #, no-c-format msgid "dc-uuid Cluster Fields Cluster Fieldsdc-uuid dc-uuid" msgstr "Câmpurile Clusterului dc-uuid Câmpurile Clusteruluidc-uuid dc-uuid" #. Tag: entry #, no-c-format msgid "Indicates which cluster node is the current leader. Used by the cluster when placing resources and determining the order of some events." msgstr "Arată care dintre nodurile clusterului este conducătorul curent. Folosit de către cluster când plasează resurse şi determină ordinea anumitor evenimente." #. Tag: entry #, no-c-format msgid "have-quorum Cluster Fields Cluster Fieldshave-quorum have-quorum" msgstr "Câmpurile Clusterului have-quorum Câmpurile Clusteruluihave-quorum have-quorum" #. Tag: entry #, no-c-format msgid "Indicates if the cluster has quorum. If false, this may mean that the cluster cannot start resources or fence other nodes. See no-quorum-policy below." msgstr "Indică dacă clusterul are quorum. Dacă este fals, acest lucru ar putea însemna că, clusterul nu poate porni resurse sau evacua forțat alte noduri. Vedeţi no-quorum-policy mai jos." #. Tag: para #, no-c-format msgid "Note that although these fields can be written to by the admin, in most cases the cluster will overwrite any values specified by the admin with the \"correct\" ones. To change the admin_epoch, for example, one would use:" msgstr "Luaţi aminte că deşi aceste câmpuri pot fi scrise de către administrator, în majoritatea cazurilor clusterul va suprascrie orice valoare specificată de către administrator cu cele \"corecte\". Pentru a schimba admin_epoch de exemplu, cineva ar putea folosi:" #. Tag: para #, no-c-format msgid "cibadmin --modify --crm_xml ‘<cib admin_epoch=\"42\"/>'" msgstr "cibadmin --modify --crm_xml ‘<cib admin_epoch=\"42\"/>'" #. Tag: para #, no-c-format msgid "A complete set of fields will look something like this:" msgstr "Un set complet de câmpuri ar arăta ceva de genul acesta:" #. Tag: title #, no-c-format msgid "An example of the fields set for a cib object" msgstr "Un exemplu al câmpurilor setate pentru un obiect CIB" #. Tag: programlisting #, no-c-format msgid "<cib have-quorum=\"true\" validate-with=\"pacemaker-1.0\"\n" " admin_epoch=\"1\" epoch=\"12\" num_updates=\"65\"\n" " dc-uuid=\"ea7d39f4-3b94-4cfa-ba7a-952956daabee\"> \n" " " msgstr "" "<cib have-quorum=\"true\" validate-with=\"pacemaker-1.0\"\n" " admin_epoch=\"1\" epoch=\"12\" num_updates=\"65\"\n" " dc-uuid=\"ea7d39f4-3b94-4cfa-ba7a-952956daabee\"> \n" " " #. Tag: para #, no-c-format msgid "Cluster options, as you might expect, control how the cluster behaves when confronted with certain situations." msgstr "Opţiunile clusterului, aşa cum v-aţi aştepta, controlează cum se comportă clusterul când se confruntă cu anumite situaţii." #. Tag: para #, no-c-format msgid "They are grouped into sets and, in advanced configurations, there may be more than one This will be described later in the section on where we will show how to have the cluster use different sets of options during working hours (when downtime is usually to be avoided at all costs) than it does during the weekends (when resources can be moved to the their preferred hosts without bothering end users) . For now we will describe the simple case where each option is present at most once." msgstr "Sunt grupate în seturi şi, în configuraţii avansate, ar putea fi mai mult de una Acest aspect va fi descris mai târziu în secţiunea despre unde vă vom arăta cum să punem clusterul să folosească diferite seturi de opţiuni în timpul orelor de lucru (când nefuncţionarea este de evitat cu orice preţ) faţă de cele folosite în timpul weekend-urilor (când resursele pot fi mutate pe gazdele preferate fără să deranjeze utilizatorii finali) . Momentan vom descrie cazul simplu în care fiecare opţiune este prezentă cel mult o dată." #. Tag: title #, no-c-format msgid "Available Cluster Options" msgstr "Opţiuni Disponibile ale Clusterului" #. Tag: entry #, no-c-format msgid "Option" msgstr "Opţiune" #. Tag: entry #, no-c-format msgid "Default" msgstr "Valoare implicită" #. Tag: entry #, no-c-format msgid "batch-limit Cluster Options Cluster Optionsbatch-limit batch-limit" msgstr "Opțiunea Clusterului batch-limit Opțiunile Clusteruluibatch-limit batch-limit" #. Tag: entry #, no-c-format msgid "30" msgstr "30" #. Tag: entry #, no-c-format msgid "The number of jobs that the TE is allowed to execute in parallel. The \"correct\" value will depend on the speed and load of your network and cluster nodes." msgstr "Numărul de sarcini pe care TE-ul este permis să le execute în paralel. Valoarea \"corectă\" va depinde de viteza şi de încărcarea reţelei şi a nodurilor voastre din cluster." #. Tag: entry #, no-c-format msgid "no-quorum-policy Cluster Options Cluster Optionsno-quorum-policy no-quorum-policy" msgstr "Opțiunea Clusterului no-quorum-policy Opțiunile Clusteruluino-quorum-policy no-quorum-policy" #. Tag: entry #, no-c-format msgid "stop" msgstr "stop" #. Tag: entry #, no-c-format msgid "What to do when the cluster does not have quorum. Allowed values:" msgstr "Ce este de făcut atunci când clusterul nu are quorum. Valori permise:" #. Tag: para #, no-c-format msgid "ignore - continue all resource management" msgstr "ignore - continuă toată gestionarea resurselor" #. Tag: para #, no-c-format msgid "freeze - continue resource management, but don't recover resources from nodes not in the affected partition" msgstr "freeze - continuă gestionarea resurselor, dar nu recupera resurse de pe noduri care nu sunt în partiţia afectată" #. Tag: para #, no-c-format msgid "stop - stop all resources in the affected cluster partition" msgstr "stop - opreşte toate resursele în partiţia de cluster afectată" #. Tag: para #, no-c-format msgid "suicide - fence all nodes in the affected cluster partition" msgstr "suicide - evacuează forțat toate nodurile din partiţia de cluster afectată" #. Tag: entry #, no-c-format msgid "symmetric-cluster Cluster Options Cluster Optionssymmetric-cluster symmetric-cluster" msgstr "Opțiunea Clusterului symmetric-cluster Opțiunile Clusteruluisymmetric-cluster symmetric-cluster" #. Tag: entry #, no-c-format msgid "TRUE" msgstr "TRUE" #. Tag: entry #, no-c-format msgid "Can all resources run on any node by default?" msgstr "Pot rula toate resursele pe orice nod în mod implicit?" #. Tag: entry #, no-c-format msgid "stonith-enabled Cluster Options Cluster Optionsstonith-enabled stonith-enabled" msgstr "Opțiunea Clusterului stonith-enabled Opțiunile Clusteruluistonith-enabled stonith-enabled" #. Tag: para #, no-c-format msgid "Should failed nodes and nodes with resources that can't be stopped be shot? If you value your data, set up a STONITH device and enable this." msgstr "Ar trebui nodurile care au eşuat şi nodurile cu resurse care nu pot fi oprite să fie împuşcate? Dacă ţineţi la datele voastre, setaţi un dispozitiv STONITH şi activaţi această opţiune." #. Tag: para #, no-c-format msgid "If true, or unset, the cluster will refuse to start resources unless one or more STONITH resources have been configured also." msgstr "Dacă este true, sau nu este setată, clusterul va refuza să pornească resurse decât dacă unul sau mai multe dispozitive STONITH au fost configurate de asemenea." #. Tag: entry #, no-c-format msgid "stonith-action Cluster Options Cluster Optionsstonith-action stonith-action" msgstr "Opțiunea Clusterului stonith-action Opțiunile Clusteruluistonith-action stonith-action" #. Tag: entry #, no-c-format msgid "reboot" msgstr "reboot" #. Tag: entry #, no-c-format msgid "Action to send to STONITH device. Allowed values: reboot, poweroff." msgstr "Acţiunea care să fie trimisă către dispozitivul STONITH. Valori permise: reboot, poweroff." #. Tag: entry #, no-c-format msgid "cluster-delay Cluster Options Cluster Optionscluster-delay cluster-delay" msgstr "Opțiunea Clusterului cluster-delay Opțiunile Clusteruluicluster-delay cluster-delay" #. Tag: entry #, no-c-format msgid "60s" msgstr "60s" #. Tag: entry #, no-c-format msgid "Round trip delay over the network (excluding action execution). The \"correct\" value will depend on the speed and load of your network and cluster nodes." msgstr "Întârzierea dus-întors experimentată pe reţea (excluzând timpul necesar executării acţiunii). Valoarea \"corectă\" va depinde de viteza şi de nivelul de încărcare al reţelei şi al nodurilor voastre din cluster." #. Tag: entry #, no-c-format msgid "stop-orphan-resources Cluster Options Cluster Optionsstop-orphan-resources stop-orphan-resources" msgstr "Opțiunea Clusterului stop-orphan-resources Opțiunile Clusteruluistop-orphan-resources stop-orphan-resources" #. Tag: entry #, no-c-format msgid "Should deleted resources be stopped?" msgstr "Ar trebui să fie oprite resursele şterse?" #. Tag: entry #, no-c-format msgid "stop-orphan-actions Cluster Options Cluster Optionsstop-orphan-actions stop-orphan-actions" msgstr "Opțiunea Clusterului stop-orphan-actions Opțiunile Clusteruluistop-orphan-actions stop-orphan-actions" #. Tag: entry #, no-c-format msgid "Should deleted actions be cancelled?" msgstr "Ar trebui anulate acţiunile şterse?" #. Tag: entry #, no-c-format msgid "start-failure-is-fatal Cluster Options Cluster Optionsstart-failure-is-fatal start-failure-is-fatal" msgstr "Opțiunea Clusterului start-failure-is-fatal Opțiunile Clusteruluistart-failure-is-fatal start-failure-is-fatal" #. Tag: entry #, no-c-format msgid "When set to FALSE, the cluster will instead use the resource's failcount and value for resource-failure-stickiness." msgstr "Când este setat pe FALSE, clusterul va folosi în schimb failcount-ul şi valoarea resursei pentru resource-failure-stickiness." #. Tag: entry #, no-c-format msgid "pe-error-series-max Cluster Options Cluster Optionspe-error-series-max pe-error-series-max" msgstr "Opțiunea Clusterului pe-error-series-max Opțiunile Clusteruluipe-error-series-max pe-error-series-max" #. Tag: entry #, no-c-format msgid "-1 (all)" msgstr "-1 (all)" #. Tag: entry #, no-c-format msgid "The number of PE inputs resulting in ERRORs to save. Used when reporting problems." msgstr "Numărul de intrări PE care rezultă în ERROR(i) de a salva. Folosite când se raporteazâ probleme." #. Tag: entry #, no-c-format msgid "pe-warn-series-max Cluster Options Cluster Optionspe-warn-series-max pe-warn-series-max" msgstr "Opțiunea Clusterului pe-warn-series-max Opțiunile Clusteruluipe-warn-series-max pe-warn-series-max" #. Tag: entry #, no-c-format msgid "The number of PE inputs resulting in WARNINGs to save. Used when reporting problems." msgstr "Numărul de intrări PE care rezultă în WARNING-uri de a salva. Folosite când se raportează probleme." #. Tag: entry #, no-c-format msgid "pe-input-series-max Cluster Options Cluster Optionspe-input-series-max pe-input-series-max" msgstr "Opțiunea Clusterului pe-input-series-max Opțiunile Clusteruluipe-input-series-max pe-input-series-max" #. Tag: entry #, no-c-format msgid "The number of \"normal\" PE inputs to save. Used when reporting problems." msgstr "Numărul de intrări PE \"normale\" care să fie salvate. Folosite când se raportează probleme." #. Tag: para #, no-c-format msgid "You can always obtain an up-to-date list of cluster options, including their default values, by running the pengine metadata command." msgstr "Puteţi întotdeauna să obţineţi o listă actualizată a opţiunilor clusterului, incluzând valorile implicite ale acestora, prin rularea comenzii pengine metadata." #. Tag: title #, no-c-format msgid "Querying Cluster Options Setting Cluster Options Cluster OptionsQuerying Cluster OptionsSetting Querying and Setting Cluster Options" msgstr "Interogarea Opțiunilor Clusterului Setarea Opțiunilor Clusterului Opțiunile ClusteruluiInterogarea Opțiunilor ClusteruluiSetarea Interogarea și Setarea Opțiunilor Clusterului" #. Tag: para #, no-c-format msgid "Cluster options can be queried and modified using the crm_attribute tool. To get the current value of cluster-delay, simply use:" msgstr "Opţiunile clusterului pot fi interogate şi modificate folosind utilitarul crm_attribute. Pentru a obţine valoarea curentă a cluster-delay, pur şi simplu folosiţi:" #. Tag: para #, no-c-format msgid "crm_attribute --attr-name cluster-delay --get-value" msgstr "crm_attribute --attr-name cluster-delay --get-value" #. Tag: para #, no-c-format msgid "which is more simply written as" msgstr "care este scrisă mai simplu ca" #. Tag: para #, no-c-format msgid "crm_attribute --get-value -n cluster-delay" msgstr "crm_attribute --get-value -n cluster-delay" #. Tag: para #, no-c-format msgid "If a value is found, you'll see a result like this:" msgstr "Dacă o valoare este găsită, atunci veţi vedea un rezultat ca acesta" #. Tag: screen #, no-c-format msgid " # crm_attribute --get-value -n cluster-delay\n" " name=cluster-delay value=60s" msgstr "" " # crm_attribute --get-value -n cluster-delay\n" " name=cluster-delay value=60s" #. Tag: para #, no-c-format msgid "However, if no value is found, the tool will display an error:" msgstr "Însă dacă nici o valoare nu este găsită, utilitarul va arăta o eroare:" #. Tag: screen #, no-c-format msgid "# crm_attribute --get-value -n clusta-deway\n" " name=clusta-deway value=(null)\n" " Error performing operation: The object/attribute does not exist" msgstr "" "# crm_attribute --get-value -n clusta-deway\n" " name=clusta-deway value=(null)\n" " Error performing operation: The object/attribute does not exist" #. Tag: para #, no-c-format msgid "To use a different value, eg. , simply run:" msgstr "Pentru a folosi o altă valoare, ex. , pur şi simplu rulaţi:" #. Tag: para #, no-c-format msgid "crm_attribute --attr-name cluster-delay --attr-value 30s" msgstr "crm_attribute --attr-name cluster-delay --attr-value 30s" #. Tag: para #, no-c-format msgid "To go back to the cluster's default value you can delete the value, for example with this command:" msgstr "Pentru a reveni la valoarea implicită a clusterului puteţi ştergeţi valoarea, de exemplu cu această comandă: " #. Tag: para #, no-c-format msgid "crm_attribute --attr-name cluster-delay --delete-attr" msgstr "crm_attribute --attr-name cluster-delay --delete-attr" #. Tag: title #, no-c-format msgid "When Options are Listed More Than Once" msgstr "Când Opţiunile sunt Listate Mai Mult De O Dată" #. Tag: para #, no-c-format msgid "If you ever see something like the following, it means that the option you're modifying is present more than once." msgstr "Dacă vedeţi vreodată ceva precum următoarele, înseamnă că opţiunea pe care o modificaţi este prezentă mai mult de o dată." #. Tag: title #, no-c-format msgid "Deleting an option that is listed twice" msgstr "Ştergerea unei opţiuni care este listată de două ori" #. Tag: screen #, no-c-format msgid "# crm_attribute --attr-name batch-limit --delete-attr\n" " Multiple attributes match name=batch-limit in crm_config:\n" " Value: 50 (set=cib-bootstrap-options, id=cib-bootstrap-options-batch-limit)\n" " Value: 100 (set=custom, id=custom-batch-limit)\n" " Please choose from one of the matches above and supply the 'id' with --attr-id" msgstr "" "# crm_attribute --attr-name batch-limit --delete-attr\n" " Multiple attributes match name=batch-limit in crm_config:\n" " Value: 50 (set=cib-bootstrap-options, id=cib-bootstrap-options-batch-limit)\n" " Value: 100 (set=custom, id=custom-batch-limit)\n" " Please choose from one of the matches above and supply the 'id' with --attr-id" #. Tag: para #, no-c-format msgid "In such cases follow the on-screen instructions to perform the requested action. To determine which value is currently being used by the cluster, please refer to the section on ." msgstr "În astfel de cazuri urmaţi instrucţiunile de pe ecran pentru a efectua acţiunea cerută. Pentru a determina care valoare este folosită în mod curent de către cluster, vă rugăm să faceţi referinţă la secţiunea despre ."