Managing HP Serviceguard A.12.00.00 for Linux, June 2014

7.6.1 Previewing the Effect of Cluster Changes
Many variables affect package placement, including the availability of cluster nodes; the availability
of networks and other resources on those nodes; failover and failback policies; and package
weights, dependencies, and priorities, if you have configured them. You can preview the effect
on packages of certain actions or events before they actually occur.
For example, you might want to check to see if the packages are placed as you expect when the
cluster first comes up; or preview what happens to the packages running on a given node if the
node halts, or if the node is then restarted; or you might want to see the effect on other packages
if another, currently disabled, package is enabled, or if a package halts and cannot restart because
none of the nodes on its node_list is available.
Serviceguard provides two ways to do this: you can use the preview mode of Serviceguard
commands, or you can use the cmeval (1m) command to simulate different cluster states.
Alternatively, you might want to model changes to the cluster as a whole; cmeval allows you to
do this; see “Using cmeval” (page 238).
7.6.1.1 What You Can Preview
You can preview any of the following, or all of them simultaneously:
Cluster bring-up (cmruncl)
Cluster node state changes (cmrunnode, cmhaltnode)
Package state changes (cmrunpkg, cmhaltpkg)
Package movement from one node to another
Package switching changes (cmmodpkg -e)
Availability of package subnets, resources, and storage
Changes in package priority, node order, dependency, failover and failback policy, node
capacity and package weight
7.6.1.2 Using cmeval
You can use cmeval to evaluate the effect of cluster changes on Serviceguard packages. You can
also use it simply to preview changes you are considering making to the cluster as a whole.
You can use cmeval safely in a production environment; it does not affect the state of the cluster
or packages. Unlike command preview mode (the -t discussed above) cmeval does not require
you to be logged in to the cluster being evaluated, and in fact that cluster does not have to be
running, though it must use the same Serviceguard release and patch version as the system on
which you run cmeval.
Use cmeval rather than command preview mode when you want to see more than the effect of
a single command, and especially when you want to see the results of large-scale changes, or
changes that may interact in complex ways, such as changes to package priorities, node order,
dependencies and so on.
Using cmeval involves three major steps:
1. Use cmviewcl -v -f line to write the current cluster configuration out to a file.
2. Edit the file to include the events or changes you want to preview
3. Using the file from Step 2 as input, run cmeval to preview the results of the changes.
For example, assume that pkg1 is a high-priority package whose primary node is node1, and
which depends on pkg2 and pkg3 to be running on the same node. These lower-priority-packages
are currently running on node2. pkg1 is down and disabled, and you want to see the effect of
enabling it.
238 Cluster and Package Maintenance