Understanding Serviceguard Package Dependencies, April 2009

6
Dependency behavior
This section describes the rules Serviceguard uses in managing packages with dependencies.
Using the cmrunpkg command
The following rules apply when you run packages that have dependencies using the cmrunpkg
command:
cmrunpkg will fail if running the packages specified on the command line will cause another
package to halt. This means if you attempt to run a higher priority package using cmrunpkg, and
this will lead to a lower priority package going down, the command will fail. Say you have the
following configuration:
pkg1 has an all nodes exclusionary dependency on pkg2
pkg1 has higher priority than pkg2
pkg1 is currently down and pkg2 is running
The command cmrunpkg pkg1 will fail, because it will cause pkg2 to halt.
You can use cmrunpkg to run a package configured with dependencies only if all of its
non-exclusionary dependencies (all packages named in a dependency condition attribute with an
“up” dependency) are either running or specified on the cmrunpkg command line. The order in
which you specify these packages on the command line does not matter. For example:
if pkg1 has a same_node “up” dependency on pkg2, you can start pkg1 using cmrunpkg if
pkg2 is already up; otherwise you must specify it on the cmrunpkg command line:
cmrunpkg pkg1 pkg2
If a package has an all nodes exclusionary (down) dependency on another package, both
packages cannot run at the same time. This means that you cannot include both packages on the
cmrunpkg command line.
If a package has a same node exclusionary (down) dependency or a different node (up)
dependency on another package, you need to use cmrunpkg with the -a option in order to include
both packages on the cmrunpkg command line,. Examples:
if pkg1 has a same_node “down” dependency on pkg2:
o cmrunpkg pkg1 is allowed
o cmrunpkg pkg1 pkg2 is not allowed
o cmrunpkg a pkg1 pkg2 is allowed
if pkg1 has a different node dependency on pkg2:
o cmrunpkg pkg1 is allowed if pkg2 is already running on a different node
o cmrunpkg pkg1 pkg2 is not allowed
o cmrunpkg a pkg1 pkg2 is allowed
NOTE:
You can use the -t option to the cmrunpkg command to preview the effect
on packages of the command before running the actual command.