Managing Serviceguard A.11.20, March 2013
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 239) 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 154). 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 156)). 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 150) and the
Comprehensive Method (page 152) 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 150).
• Node capacity is defined in the cluster configuration file, via the CAPACITY_NAME and
CAPACITY_VALUE parameters.
• Capacities can be added, changed, and deleted while the cluster is running. This can cause
some packages to be moved, or even halted and not restarted.
Package Configuration Planning 155