Utility to visualize Resource Group and Resource Dependencies and Affinities

 The Open HA Cluster utilities available from this project page are released under the Common Development and Distribution License (CDDL) Version 1.0.

Solaris Cluster Express did improve a lot with the new command line interface and the updated Solaris Cluster Manager Browser User Interface (BUI). The BUI has a Topology view for resource groups and resources in order to visualize the various dependencies and affinities the cluster framework offers.

It is also a good idea to document a cluster configuration carefully. For that purpose an online view within a BUI is not always helping. And sometimes you want to see all dependencies/affinities within one graph.

Fortunately the cluster framework does offer the scha_cmds(1HA) API, which makes it possible to retrieve all informations out of the cluster and use them e.g. in shell scripts. And there are already tools available as open source which do a great job in visualizing graphs. One tool I selected is Graphviz, which is available for a lot of platforms, including Solaris. The Companion  Software CD for Solaris does provide a ready to install package for SPARC and x86.

The cluster2dot shell script extracts the necessary informations out of the cluster framework and creates two files, one for the resource groups with dependencies and various affinities, and one for the resouces with the various dependencies. The files contain the output ready for the dot language consumed by Graphviz.

You can browse the source online, presented through OpenGrok.

The script will create two files for further use:

  1. /tmp/${CLUSTERNAME}-resourcegroups.dot
  2. /tmp/${CLUSTERNAME}-resources.dot

Both files can then be used as input files for the dot command within the graphviz tools, e.g.:


$ dot -Tps /tmp/${CLUSTERNAME}-resources.dot -o ${CLUSTERNAME}-resources.ps

to create a postscript file to visualize the dependencies.

  1. is creating a directed graph for resource group dependencies and affinities.
    1* black solid arrow = RG dependency
    1* green solid arrow = strong positive affinity with failover delegation
    1* blue solid arrow = strong positive affinity
    1* brown dotted arrow = weak positive affinity
    1* red solid arrow = strong negative affinity
    1* orange dotted arrow = weak negative affinity
  2. is creating a directed graph for the various resource dependencies.
    1* black solid arrow = resource dependency
    1* black dotted arrow = weak resource dependency
    1* red solid arrow = restart dependency
    1* orange solid arrow = offline restart dependencies
    1* yellow solid arrow = implicit dependency on network resources

Here you can see some example outputs, in this case converted into png files. You can click on the images to enlarge them for better view.

evans-resourcegroups.png
Figure 1
: Resource dependencies graph for the evans cluster. View the corresponding dot file.

evans-resources.png
Figure 2
: Resource dependencies graph for the evans cluster. View the corresponding dot file.

Resource dependencies graph for the geo-muc1 cluster
Figure 3
: Resource group dependencies graph for the geo-muc1 cluster. View the corresponding dot file.

geo-muc1-resources.png
Figure 4
: Resource dependencies graph for the geo-muc1 cluster. View the corresponding dot file.

last modified by admin on 2009/10/26 12:44
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.