The tool uses the same library as the live cluster to show what it
would have done given the supplied input. It's output, in addition to
a significant amount of logging, is stored in two files +tmp.graph+
and +tmp.dot+, both are representations of the same thing -- the
cluster's response to your changes.
In the graph file is stored the complete transition, containing a list
of all the actions, their parameters and their pre-requisites.
Because the transition graph is not terribly easy to read, the tool
also generates a Graphviz dot-file representing the same information.
== Interpreting the Graphviz output ==
* Arrows indicate ordering dependencies
* Dashed-arrows indicate dependencies that are not present in the transition graph
* Actions with a dashed border of any color do not form part of the transition graph
* Actions with a green border form part of the transition graph
* Actions with a red border are ones the cluster would like to execute but cannot run
* Actions with a blue border are ones the cluster does not feel need to be executed
* Actions with orange text are pseudo/pretend actions that the cluster uses to simplify the graph
* Actions with black text are sent to the LRM
* Resource actions have text of the form pass:[<replaceable>rsc</replaceable>]_pass:[<replaceable>action</replaceable>]_pass:[<replaceable>interval</replaceable>] pass:[<replaceable>node</replaceable>]
* Any action depending on an action with a red border will not be able to execute.
* Loops are _really_ bad. Please report them to the development team.
=== Small Cluster Transition ===
image::images/Policy-Engine-small.png["An example transition graph as represented by Graphviz",width="16cm",height="6cm",align="center"]
In the above example, it appears that a new node, +node2+, has come
online and that the cluster is checking to make sure +rsc1+, +rsc2+
and +rsc3+ are not already running there (Indicated by the
+*_monitor_0+ entries). Once it did that, and assuming the resources
were not active there, it would have liked to stop +rsc1+ and +rsc2+
on +node1+ and move them to +node2+. However, there appears to be
some problem and the cluster cannot or is not permitted to perform the
stop actions which implies it also cannot perform the start actions.
For some reason the cluster does not want to start +rsc3+ anywhere.
For information on the options supported by ptest, use
pass:[<command>ptest --help</command>].
=== Complex Cluster Transition ===
image::images/Policy-Engine-big.png["Another, slightly more complex, transition graph that you're not expected to be able to read",width="16cm",height="20cm",align="center"]
== Do I Need to Update the Configuration on all Cluster Nodes? ==
No. Any changes are immediately synchronized to the other active
members of the cluster.
To reduce bandwidth, the cluster only broadcasts the incremental
updates that result from your changes and uses MD5 checksums to ensure
msgid "The cluster is written using XML notation and divided into two main sections: configuration and status."
msgstr ""
#. Tag: para
#, no-c-format
msgid "The status section contains the history of each resource on each node and based on this data, the cluster can construct the complete current state of the cluster. The authoritative source for the status section is the local resource manager (lrmd) process on each cluster node and the cluster will occasionally repopulate the entire section. For this reason it is never written to disk and administrators are advised against modifying it in any way."
msgstr ""
#. Tag: para
#, no-c-format
msgid "The configuration section contains the more traditional information like cluster options, lists of resources and indications of where they should be placed. The configuration section is the primary focus of this document."
msgstr ""
#. Tag: para
#, no-c-format
msgid "The configuration section itself is divided into four parts:"
msgid "Before one starts to configure a cluster, it is worth explaining how to view the finished product. For this purpose we have created the <command>crm_mon</command> utility that will display the current state of an active cluster. It can show the cluster status by node or by resource and can be used in either single-shot or dynamically-updating mode. There are also modes for displaying a list of the operations performed (grouped by node and resource) as well as information about failures."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Using this tool, you can examine the state of the cluster for irregularities and see how it responds when you cause or simulate failures."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Details on all the available options can be obtained using the <command>crm_mon --help</command> command."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Sample output from crm_mon"
msgstr ""
#. Tag: screen
#, no-c-format
msgid " ============\n"
" Last updated: Fri Nov 23 15:26:13 2007\n"
" Current DC: sles-3 (2298606a-6a8c-499a-9d25-76242f7006ec)\n"
" child_DoFencing:2 (stonith:external/vmware): Started sles-1"
msgstr ""
#. Tag: para
#, no-c-format
msgid "The DC (Designated Controller) node is where all the decisions are made and if the current DC fails a new one is elected from the remaining cluster nodes. The choice of DC is of no significance to an administrator beyond the fact that its logs will generally be more interesting."
msgstr ""
#. Tag: title
#, no-c-format
msgid "How Should the Configuration be Updated?"
msgstr ""
#. Tag: para
#, no-c-format
msgid "There are three basic rules for updating the cluster configuration:"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Rule 1 - Never edit the cib.xml file manually. Ever. I’m not making this up."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Rule 2 - Read Rule 1 again."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Rule 3 - The cluster will notice if you ignored rules 1 & 2 and refuse to use the configuration."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Now that it is clear how NOT to update the configuration, we can begin to explain how you should."
msgstr ""
#. Tag: para
#, no-c-format
msgid "The most powerful tool for modifying the configuration is the <literal>cibadmin</literal> command which talks to a running cluster. With <literal>cibadmin</literal>, the user can query, add, remove, update or replace any part of the configuration; all changes take effect immediately, so there is no need to perform a reload-like operation."
msgstr ""
#. Tag: para
#, no-c-format
msgid "The simplest way of using cibadmin is to use it to save the current configuration to a temporary file, edit that file with your favorite text or XML editor and then upload the revised configuration."
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid "# cibadmin --query > tmp.xml\n"
"# vi tmp.xml\n"
"# cibadmin --replace --xml-file tmp.xml"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Some of the better XML editors can make use of a Relax NG schema to help make sure any changes you make are valid. The schema describing the configuration can normally be found in <filename>/usr/lib/heartbeat/pacemaker.rng</filename> on most systems."
msgstr ""
#. Tag: para
#, no-c-format
msgid "If you only wanted to modify the resources section, you could instead do"
msgid "Next identify the resource’s tag name and id (in this case we’ll choose <literal>primitive</literal> and <literal>child_DoFencing</literal>). Then simply execute:"
msgid "Often it is desirable to preview the effects of a series of changes before updating the configuration atomically. For this purpose we have created <command>crm_shadow</command> which creates a \"shadow\" copy of the configuration and arranges for all the command line tools to use it."
msgstr ""
#. Tag: para
#, no-c-format
msgid "To begin, simply invoke <command>crm_shadow</command> and give it the name of a configuration to create <footnote><para>Shadow copies are identified with a name, making it possible to have more than one.</para></footnote> ; be sure to follow the simple on-screen instructions."
msgstr ""
#. Tag: para
#, no-c-format
-msgid "Read the above carefully, failure to do so could result in you destroying the cluster’s active configuration!</warning>"
+msgid "Read the above carefully, failure to do so could result in you destroying the cluster’s active configuration!"
msgstr ""
#. Tag: programlisting
#, no-c-format
msgid " # crm_shadow --create test\n"
" Setting up shadow instance\n"
" Type Ctrl-D to exit the crm_shadow shell\n"
" shadow[test]:\n"
" shadow[test] # crm_shadow --which\n"
" test"
msgstr ""
#. Tag: para
#, no-c-format
msgid "From this point on, all cluster commands will automatically use the shadow copy instead of talking to the cluster’s active configuration. Once you have finished experimenting, you can either commit the changes, or discard them as shown below. Again, be sure to follow the on-screen instructions carefully."
msgstr ""
#. Tag: para
#, no-c-format
msgid "For a full list of <command>crm_shadow</command> options and commands, invoke it with the <parameter>--help</parameter> option."
msgid "Making changes in a sandbox and verifying the real configuration is untouched"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Testing Your Configuration Changes"
msgstr ""
#. Tag: para
#, no-c-format
msgid "We saw previously how to make a series of changes to a \"shadow\" copy of the configuration. Before loading the changes back into the cluster (eg. <command>crm_shadow --commit mytest --force</command>), it is often advisable to simulate the effect of the changes with <literal>ptest</literal>, eg."
msgid "The tool uses the same library as the live cluster to show what it would have done given the supplied input. It’s output, in addition to a significant amount of logging, is stored in two files <literal>tmp.graph</literal> and <literal>tmp.dot</literal>, both are representations of the same thing — the cluster’s response to your changes."
msgstr ""
#. Tag: para
#, no-c-format
msgid "In the graph file is stored the complete transition, containing a list of all the actions, their parameters and their pre-requisites. Because the transition graph is not terribly easy to read, the tool also generates a Graphviz dot-file representing the same information."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Interpreting the Graphviz output"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Arrows indicate ordering dependencies"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Dashed-arrows indicate dependencies that are not present in the transition graph"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Actions with a dashed border of any color do not form part of the transition graph"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Actions with a green border form part of the transition graph"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Actions with a red border are ones the cluster would like to execute but cannot run"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Actions with a blue border are ones the cluster does not feel need to be executed"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Actions with orange text are pseudo/pretend actions that the cluster uses to simplify the graph"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Actions with black text are sent to the LRM"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Resource actions have text of the form <replaceable>rsc</replaceable>_<replaceable>action</replaceable>_<replaceable>interval</replaceable> <replaceable>node</replaceable>"
msgstr ""
#. Tag: para
#, no-c-format
msgid "Any action depending on an action with a red border will not be able to execute."
msgstr ""
#. Tag: para
#, no-c-format
msgid "Loops are <emphasis>really</emphasis> bad. Please report them to the development team."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Small Cluster Transition"
msgstr ""
#. Tag: phrase
#, no-c-format
msgid "An example transition graph as represented by Graphviz"
msgstr ""
#. Tag: para
#, no-c-format
msgid "In the above example, it appears that a new node, <literal>node2</literal>, has come online and that the cluster is checking to make sure <literal>rsc1</literal>, <literal>rsc2</literal> and <literal>rsc3</literal> are not already running there (Indicated by the <literal>*_monitor_0</literal> entries). Once it did that, and assuming the resources were not active there, it would have liked to stop <literal>rsc1</literal> and <literal>rsc2</literal> on <literal>node1</literal> and move them to <literal>node2</literal>. However, there appears to be some problem and the cluster cannot or is not permitted to perform the stop actions which implies it also cannot perform the start actions. For some reason the cluster does not want to start <literal>rsc3</literal> anywhere."
msgstr ""
#. Tag: para
#, no-c-format
msgid "For information on the options supported by ptest, use <command>ptest --help</command>."
msgstr ""
#. Tag: title
#, no-c-format
msgid "Complex Cluster Transition"
msgstr ""
#. Tag: phrase
#, no-c-format
msgid "Another, slightly more complex, transition graph that you're not expected to be able to read"
msgstr ""
#. Tag: title
#, no-c-format
msgid "Do I Need to Update the Configuration on all Cluster Nodes?"
msgstr ""
#. Tag: para
#, no-c-format
msgid "No. Any changes are immediately synchronized to the other active members of the cluster."
msgstr ""
#. Tag: para
#, no-c-format
msgid "To reduce bandwidth, the cluster only broadcasts the incremental updates that result from your changes and uses MD5 checksums to ensure that each copy is completely consistent."