Using Serviceguard Node Capacities and Package Weights, April 2009
4
2. You can define a cluster-wide default weight for packages by means of the weight_name and
weight_default parameters in the cluster configuration file.
• The weight_name sets the name of the weight.
Note: A package weight corresponds to a node capacity of the same name. This
weight_name must exactly match the corresponding capacity_name for the node.
• The weight_default sets the default weight for all packages that do not have the weight
defined in their package configuration file.
Note: A package weight defined in the package configuration file overrides the default
weight.
• See the following Table 2 for an example.
• See “Using a Default Weight” below for more information.
You cannot define a package weight if you have not defined a capacity of the same name for at least
one of the package’s configured nodes.
If you do not specify a weight_name and weight_default corresponding to a capacity in the
cluster configuration file, and you also do not specify a weight_name and weight_value for this
capacity in a package’s configuration file, Serviceguard assumes that the package is “weightless” for
this capacity (that is it has weight value of 0).
Case-insensitive parameters
Note that, as with all cluster and package configuration parameters, the parameters
capacity_name, capacity_value, weight_name, weight_default and the
weight_value are case insensitive. This means that “CAPACITY_NAME” is the same as
“capacity_name”, and so on. But the name of the capacity/weight, the value you assign to the
capacity_name and weight_name parameters, is case sensitive. This means that weight_name Foo
does not match capacity_name foo.
For the node and packages defined in the preceding Figure 1, the following table shows the entries
for the capacity definition for node1 in the cluster configuration file, and weight definition for pkg1,
pkg2 and pkg3 in the corresponding package configuration files.
Table 1: Using Capacity and Weight parameters
Package configuration file: weight definitionCluster configuration file:
Capacity definition for
Node1
Pkg1 Pkg2 Pkg3
node_name node1
…
capacity_name foo1
capacity_value 70
capacity_name foo2
capacity_value 30
package_name pkg1
…
weight_name foo1
weight_value 30
weight_name foo2
weight_value 10
package_name pkg2
…
weight_name foo1
weight_value 10
weight_name foo2
weight_value 15
package_name pkg3
…
weight_name foo1
weight_value 20
weight_name foo2
weight_value 10
Using a default weight
As Table 1 shows, the weight_value parameter, defined in the package configuration file,
specifies the weight of each package in relation to the corresponding node capacity, defined in the
cluster configuration file. But you do not always need to configure the weight_value.
There may be cases in which most packages use the same amount of a given resource (this could be
quantified, for example, as 10) but some packages use a different amount of that resource (for
example 15) . You can use the weight_default parameter in the cluster configuration file to
specify a default weight for all packages that do not have a weight defined in their package