Understanding Serviceguard Package Dependencies, April 2009

9
Figure 1: Automatic mode example
Initial startup example
Let’s assume all the packages in Figure 1 above are down. If they all have auto_run enabled, pkg1,
pkg2, pkg3 and pkg5 start on node1 and pkg4 starts on node2. Pkg2 is the highest priority package
and prefers to run on node1. It requires pkg5 to run on the same node. So pkg2 and pkg5 will run on
node1. Pkg1 requires pkg2 to be up on the same node and it requires pkg4 to be down on the same
node. Since pkg1 has higher priority than pkg4, and pkg2 is running on node1, pkg1 will run on
node1. Pkg3 will start on node1 where pkg5 is running. Pkg4 prefers to run on node1. But it requires
pkg1 to be down on the same node. Since it has lower priority than pkg1 and pkg1 is running on
node1, pkg4 cannot run on node1. Since pkg5 is running on node1, pkg4’s any_node dependency
is satisfied on node2. So it will run on node2.
Package and node failure examples
In Figure 1 above, say pkg1, pkg2, pkg3, and pkg5 are running on node1 and pkg4 is running on
node2. The following sections provide examples of how Serviceguard responds to package and
node failures.
What if pkg1 fails?
If pkg1 fails, it will go down and not fail over, because it requires pkg2 to be running on the same
node. Since pkg2 has higher priority than pkg1, pkg1 cannot drag pkg2 to another node.
What if pkg2 fails?
Pkg2 is the highest-priority package on the dependency graph. So if both pkg2 and the package that
it depends on (pkg5) can run on node2, Serviceguard will halt or move any package in order to run
pkg2 on node2. That means that pkg1, pkg2 and pkg5 will have to be halted and moved. Since
pkg3 and pkg4 depend on pkg5, they will have to be halted also. Serviceguard will halt pkg1 before
pkg2 and will halt pkg2, pkg3 and pkg4 before pkg5 (this assumes the default value for the
successor_halt_timeout parameter; see the cmmakepkg manpage for the description of this
parameter). Once pkg5 is halted, Serviceguard will start pkg5 on node2. Then it will start pkg2 and
pkg3. Pkg1 will start on node node2 after pkg2 is up. Since pkg1 requires pkg4 to be down on the
same node and it has higher priority than pkg4, pkg4 starts on node1.
Same node
UP dep
Same node
DOWN dep
Any node
UP dep
Same node
UP dep
Same node
UP dep
Package name = pkg1
Nodes = node 1, node 2
Priority = 30
Package name = pkg4
Nodes = node 1, node 2
Priority = no_priority
Package name = pkg2
Nodes = node 1, node 2
Priority = 10
Package name = pkg5
Nodes = node 1, node 2
Priority = no_priority
Package name = pkg3
Nodes = node 1, node 2
Priority = 20