Managing HP Serviceguard for Linux Ninth Edition, April 2009

WEIGHT_NAME B
WEIGHT_DEFAULT 15
This means that any package for which weight A is not defined in its package
configuration file will have a weight A of 20, and any package for which weight B is
not defined in its package configuration file will have a weight B of 15.
Given the capacities we defined in the cluster configuration file (see “Defining
Capacities”), node1 can run any three packages that use the default for both A and B.
This would leave 20 units of spare A capacity on this node, and 5 units of spare B
capacity.
Defining Weights for Individual Packages
For each capacity you define in the cluster configuration file (see “Defining Capacities”)
you have the following choices when it comes to assigning a corresponding weight to
a given package:
1. Configure a cluster-wide default weight and let the package use that default.
2. Configure a cluster-wide default weight but override it for this package in its
package configuration file.
3. Do not configure a cluster-wide default weight, but assign a weight to this package
in its package configuration file.
4. Do not configure a cluster-wide default weight and do not assign a weight for this
package in its package configuration file.
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 131), we can now use
options 1 and 2 to set weights for pkg1 through pkg4.
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:
134 Planning and Documenting an HA Cluster