Understanding Serviceguard Package Dependencies, April 2009

7
Using the cmhaltpkg command
The following rules apply when halting packages with dependencies using the cmhaltpkg
command:
You can halt a package using cmhaltpkg command only if its non-exclusionary dependent
packages are either down or specified on the cmhaltpkg command line. Non- exclusionary
dependents are packages that have defined an "up" dependency on this package. 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 halt pkg2 using cmhaltpkg, if
pkg1is already down; otherwise you must specify it on the cmhaltpkg command line:
cmhaltpkg pkg1 pkg2
if pkg1 has a same_node “down” dependency on pkg2, you can halt pkg2 without halting pkg1.
cmhaltpkg will fail if halting the packages specified on the command line will cause a package not
specified on the command line to halt. Say you have the following configuration:
pkg1 (with priority 10) has an all nodes exclusionary dependency on pkg2 (with priority 20)
pkg3 (with priority 30) also has an all nodes exclusionary dependency on pkg2
pkg1 and pkg3 are currently running and pkg2 is down because pkg1 with higher priority is up.
The command cmhaltpkg pkg1 will fail, because it will allow pkg2 with priority 20 to start which
will force the lower priority pkg3 down. You need to halt pkg3 before running the command.
Note:
You can use the -t option to the cmhaltpkg command to preview the effect
on packages of the command before running the actual command.
Using the cmapplyconf command
Modifying the cluster or a package configuration while the cluster and packages are running may
cause some packages to start, halt or move due to package dependencies. For example if you
increase the priority of a package with a same-node exclusionary dependency on another package
which is running, it may cause that package to go down. The cmapplyconf command (also
cmcheckconf) will issue a warning if the change in configuration causes a package to halt or move.
Using other commands
Using commands like cmmodpkg, cmrunnode, and cmhaltnode may cause some packages to
start, halt or move due to package dependencies. You can use the -t option to these commands to
preview the effect the command will have on packages before running the actual command.