Managing HP Serviceguard for Linux, Tenth Edition, September 2012

weight_value 40
IMPORTANT: weight_name in the package configuration file must exactly match the
corresponding CAPACITY_NAME in the cluster configuration file. This applies to case as
well as spelling: weight_name a would not match CAPACITY_NAME A.
You cannot define a weight unless the corresponding capacity is defined: cmapplyconf
will fail if you define a weight in the package configuration file and no node in the
package's node_name list (page 206) has specified a corresponding capacity in the
cluster configuration file; or if you define a default weight in the cluster configuration file
and no node in the cluster specifies a capacity of the same name.
Some points to notice about this example:
Since we did not configure a B weight for pkg1 or pkg2, these packages have the
default B weight (15) that we set in the cluster configuration file in Example 3
(page 143). Similarly, pkg4 has the default A weight (20).
We have configured pkg3 to have a B weight of 35, but no A weight.
pkg1 will consume all of node2's A capacity; no other package that has A weight
can run on this node while pkg1 is running there.
But node2 could still run pkg3 while running pkg1, because pkg3 has no A weight,
and pkg1 is consuming only 15 units (the default) of node2's B capacity, leaving
35 available to pkg3 (assuming no other package that has B weight is already
running there).
Similarly, if any package that has A weight is already running on node2, pkg1 will
not be able to start there (unless pkg1 has sufficient priority to force another package
or packages to move; see “How Package Weights Interact with Package Priorities
and Dependencies (page 146)). This is true whenever a package has a weight that
exceeds the available amount of the corresponding capacity on the node.
Rules and Guidelines
The following rules and guidelines apply to both the Simple Method (page 139) and the
Comprehensive Method (page 141) of configuring capacities and weights.
You can define a maximum of four capacities, and corresponding weights, throughout
the cluster.
NOTE: But if you use the reserved CAPACITY_NAME package_limit, you can
define only that single capacity and corresponding weight. See “Simple Method”
(page 139).
Node capacity is defined in the cluster configuration file, via the CAPACITY_NAME
and CAPACITY_VALUE parameters.
Package Configuration Planning 145