SUSE Conversations


Visualizing Heartbeat (HA) managed resource dependencies

variia

By: variia

July 31, 2008 4:42 pm

Reads:791

Comments:1

Score:Unrated

Print/PDF

This tip explains how to visualize HA managed resources and their dependencies with a graph.

Problem:

I have 2 HASI clusters managing XEN virtual machines as resources and as part of my documentation I wanted to visualize the various resources and their dependencies.

Tools:

heartbeat-2.1.3-0.9
heartbeat-cmpi-2.1.3-0.9
heartbeat-ldirectord-2.1.3-0.9
heartbeat-pils-2.1.3-0.9
heartbeat-stonith-2.1.3-0.9
sles-heartbeat_en-10.1-0.20
yast2-heartbeat-2.13.13-0.3

These are available from standard SLES10 SP2 installation sources.

graphviz-2.6-22.2 is available from SLE10SP2 SDK (Software Development Kit) media or installation source.

Solution:

Heartbeat package includes a tool named “ptest” which is used for testing for instance modified crm (V2) configurations without actually loading them into the cluster.

geeko:~ # rpm -qf /usr/sbin/ptest
heartbeat-2.1.3-0.9

Get a full config of your V2 cluster without “lrm” lines:

geeko:~ # cibadmin -Q | grep -v lrm > `hostname`.xml

By removing the lrm_resources tags (grep -v lrm), the tool thinks that nothing is running and shows what it would do to start everything from scratch.

Translate the saved xml file to DOT formatted transition graph:

geeko:~ # ptest -D `hostname`.dot  -X `hostname`.xml

Draw a directed graph:

geeko:~ # dot -Tjpg -o `hostname`.jpg `hostname`.dot

There are other utilities available drawing different type of graphs (neato, twopi, circo, fdp), you can get some idea about what they do from the man pages.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Tags: , ,
Categories: SUSE Linux Enterprise Server, Technical Solutions, Virtualization

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

1 Comment

  1. By:windl

    The “-X” in “ptest -D `hostname`.dot -X `hostname`.xml” needs to be lower case (at least in SLES11 SP1).
    Despite of that, a non-trivial configuration cannot be visualized:
    h01:~ # cibadmin -Q | grep -v lrm >cib.xml
    h01:~ # ptest -D foo.dot -x cib.xml
    h01:~ # dot -Tjpg -o foo.jpg foo.dot
    dot: width (95560 >= 32768) is too large.
    Segmentation fault
    When using “-Tps” instead, I get a 300kB PostScript file, but that just prints an empty page.

Comment

RSS