How To Use crm_simulate To Graph Resource Constraints

This article will help you make "dot" graphs to visualize Pacemaker configurations and validate constraints.

From a machine with crm_simulate installed (part of pacemaker), and the cib.xml from the cluster you wish to graph:

$ crm_simulate --xml-file=cib.xml -VVVVV --save-graph tmp.graph --save-dotfile tmp.dot --node-up host-a --node-up host-b --node-up host-c --node-up host-d

Then, using the output dot file:

$ dot -Tpdf tmp.dot -o tmp.pdf

To render the graph from left->right as opposed to top->bottom, add rankdir="LR" to the .dot file:

digraph "g" {
rankdir="LR";
"p_redis:1_post_notify_start_0 host-a (586)" [ style=bold color="green" fontcolor="black"]
"p_redis:0_post_notify_start_0 host-b (585)" [ style=bold color="green" fontcolor="black"]
[...]

 

Reviewed 2020/12/07 - DGT