Managing HP Serviceguard A.11.20.20 for Linux, March 2014

NOTE: Option 4 means that the package is “weightless” as far as this particular capacity is
concerned, and can run even on a node on which this capacity is completely consumed by other
packages.
(You can make a package weightless for a given capacity even if you have defined a cluster-wide
default weight; simply set the corresponding weight to zero in the package's cluster configuration
file.)
Pursuing the example started under “Defining Capacities” (page 122), we can now use options 1
and 2 to set weights for pkg1 through pkg4.
4.8.10.4.2.2.1 Example 4
In pkg1's package configuration file:
weight_name A
weight_value 60
In pkg2's package configuration file:
weight_name A
weight_value 40
In pkg3's package configuration file:
weight_name B
weight_value 35
weight_name A
weight_value 0
In pkg4's package configuration file:
weight_name B
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 176) 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 124). 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
4.8 Package Configuration Planning 125