Managing HP Serviceguard A.12.00.00 for Linux, June 2014
3. Create eight packages with the following weight_name and weight_value and dependency
conditions:
package:pkg1|weight:test_capacity|name=test_capacity
package:pkg1|weight:test_capacity|value=13
package:pkg2|weight:test_capacity|name=test_capacity
package:pkg2|weight:test_capacity|value=25
package:pkg3|weight:test_capacity|name=test_capacity
package:pkg3|weight:test_capacity|value=4
package:pkg4|weight:test_capacity|name=test_capacity
package:pkg4|weight:test_capacity|value=22
package:pkg5|weight:test_capacity|name=test_capacity
package:pkg5|weight:test_capacity|value=19
package:pkg6|weight:test_capacity|name=test_capacity
package:pkg6|weight:test_capacity|value=11
package:mnpkg1|weight:test_capacity|name=test_capacity
package:mnpkg1|weight:test_capacity|value=50
package:mnpkg2|weight:test_capacity|name=test_capacity
package:mnpkg2|weight:test_capacity|value=3
For pkg1 following are the dependencies:
dependency_name: pkg2dep
dependency_condition: pkg2=up
dependency_location: same_node
For pkg3 following are the dependencies:
dependency_name: pkg4dep
dependency_condition: pkg4=up
dependency_location: different_node
For pkg5 following are the dependencies:
dependency_name: pkg6dep
dependency_condition: pkg6=up
dependency_location: any_node
mnpkg1 is configured to run on:
node_name Node 1
node_name Node 4
All other packages are configured to run on all nodes.
The packages are sorted according to the cumulative weight of the dependency tree, where:
• pkg1 and pkg2 have cumulative weight of 38
• pkg3 and pkg4 have cumulative weight of 26
• pkg5 and pkg6 have cumulative weight of 30
• mnpkg1 has weight of 50
• mnpkg2 has weight of 3
4. Run the cmrunpkg -a command:
cmrunpkg -a pkg1 pkg2 pkg3 pkg4 pkg5 pkg6 mnpkg1 mnpkg2
The leaf packages are sorted based on the complete weight of the dependency tree:
mnpkg1, pkg2, pkg6, pkg4, mnpkg2, pkg5, pkg1, pkg3.
Each package is placed based on the capacity used on each node:
• mnpkg1 is placed on Node 1 and Node 4 which is of weight 50
• pkg2 is placed on Node 2 which is of weight 25
132 Planning and Documenting an HA Cluster