Understanding Serviceguard Package Dependencies, April 2009

10
What if pkg3 fails?
If pkg3 fails on node1, it will halt and will not be failed over. In order for pkg3 to fail over to node2,
it requires pkg5 on the same node. So it needs to drag pkg5 to node2. Pkg3 has higher priority than
pkg5 and it can drag pkg5. Moving pkg5 to node2 means pkg2 will need to move to node2. So,
pkg3 will have to drag pkg2 also. Pkg3 cannot drag pkg2 because pkg2 has higher priority.
This shows that the rule for dragging applies to the entire dependency graph. If a package fails, it
cannot drag other packages unless it has higher priority than all the packages that it directly or
indirectly halts or moves. In this example, in order to start pkg3 on node2, we need to move or restart
pkg1, pkg2, pkg4, and pkg5.
What if pkg4 fails?
If pkg4 fails on node2, it will halt. It cannot be started on node1 because pkg1 has a higher priority
and is running on node1. However, if you use the cmhaltpkg command to halt pkg1 on node1, pkg4
will start on node1.
What if pkg5 fails?
If pkg5 fails on node1, this will cause pkg2, pkg3 and pkg4 to fail. Since pkg1 depends on pkg2,
pkg1 will fail also. Serviceguard will halt these packages in the order described for pkg2’s failure
and will restart pkg1, pkg2, pkg3, pkg4 and pkg5 as described for pkg2’s failure above.
What if node1 fails?
If node1 fails, pkg2, pkg3 and pkg5 will start on node2. Since pkg1 has higher priority than pkg4
and requires pkg4 to be down on node2, pkg4 will be halted and pkg1 will start on node2.
What if node2 fails?
If node2 fails, pkg4 will go down. It will not be restarted because of the exclusionary dependency
with the higher priority package pkg1.
Assigning priorities
In order to determine what priority to assign to packages with dependencies, you need to decide if a
dependent package should be able to halt or move other packages in order to meet its dependencies.
This section shows how to assign priorities in different scenarios:
1. You have three packages. PkgA requires that pkgB run on the same node,
and pkgB requires that pkgC run on the same node. PkgA, pkgB, and pkgC
should act as a group. If any of them fails, they should go where all can run.
Assign the highest priority to pkgA and 2nd highest priority to pkgB.
Set pkgAs priority to 10, pkgB's to 20 and pkgC's to 30.
2. You have six packages. PkgA, pkgB, and pkgC should act as a group as in
previous scenario. PkgD, pkgE, and pkgF should act as group as in previous
scenario.
Assign the highest priority to pkgA and 2nd highest priority to pkgB in their group.
Assign the highest priority to pkgD and 2nd highest priority to pkgE in their group.
Set pkgA's priority to 10, pkgB's to 20 and pkgC's to 30.
Set pkgD's priority to 40, pkgE's to 50 and pkgD's to 60
3. You have three packages. PkgA requires that pkgB run on the same node, and
pkgB requires that pkgC run on the same node. If pkgA fails, it should not
affect pkgB and pkgC (pkgA should not drag pkgB and pkgC). But pkgB and
pkgC should act as a group. If pkgB fails, it should drag pkgC.