Managing Serviceguard A.11.20, March 2013

Package weight can be defined in cluster configuration file, via the WEIGHT_NAME and
WEIGHT_DEFAULT parameters, or in the package configuration file, via the weight_name
and weight_value parameters, or both.
Weights can be assigned (and WEIGHT_DEFAULTs, apply) only to multi-node packages and
to failover packages whose failover_policy (page 241) is configured_node and whose
failback_policy (page 242) is manual.
If you define weight (weight_name and weight_value) for a package, make sure you
define the corresponding capacity (CAPACITY_NAME and CAPACITY_VALUE) in the cluster
configuration file for at least one node on the package's node_name list (page 239). Otherwise
cmapplyconf will fail when you try to apply the package.
Weights (both cluster-wide WEIGHT_DEFAULTs, and weights defined in the package
configuration files) can be changed while the cluster is up and the packages are running. This
can cause some packages to be moved, or even halted and not restarted.
For More Information
For more information about capacities, see the comments under CAPACITY_NAME and
CAPACITY_VALUE in:
the cluster configuration file
the cmquerycl (1m) manpage
the section “Cluster Configuration Parameters ” (page 114) in this manual.
For more information about weights, see the comments under weight_name and weight_value
in:
the package configuration file
the cmmakepkg (1m) manpage
the section “Package Parameter Explanations” (page 237) in this manual.
For further discussion and use cases, see the white paper Using Serviceguard’s Node Capacity
and Package Weight Feature at http://www.hp.com/go/hpux-serviceguard-docs.
How Package Weights Interact with Package Priorities and Dependencies
If necessary, Serviceguard will halt a running lower-priority package that has weight to make room
for a higher-priority package that has weight. But a running package that has no priority (that is,
its priority is set to the default, no_priority) will not be halted to make room for a down
package that has no priority. Between two down packages without priority, Serviceguard will
decide which package to start if it cannot start them both because there is not enough node capacity
to support their weight.
Example 1
pkg1 is configured to run on nodes turkey and griffon. It has a weight of 1 and a priority
of 10. It is down and has switching disabled.
pkg2 is configured to run on nodes turkey and griffon. It has a weight of 1 and a priority
of 20. It is running on node turkey and has switching enabled.
turkey and griffon can run one package each (package_limit is set to 1).
If you enable switching for pkg1, Serviceguard will halt the lower-priority pkg2 on turkey. It
will then start pkg1 on turkey and restart pkg2 on griffon.
If neither pkg1 nor pkg2 had priority, pkg2 would continue running on turkey and pkg1 would
run on griffon.
156 Planning and Documenting an HA Cluster