Dependency links

The dependency relationship between a parent and a child is called a link. The link is characterized by the dependency category, the location of the service groups, and the rigidity of dependency.

You can customize the behavior of service groups by choosing the right combination of the dependency category, location, and rigidity.

Dependency categories: online or offline dependencies

Dependency categories determine the relationship of the parent group with the state of the child group.

Online group dependency
The parent group must wait for the child group to be brought online before it can start.
For example, to configure a database application and a database service as two separate groups, specify the database application as the parent, and the database service as the child.
Offline group dependency
The parent group can be started only if the child group is offline and vice versa. This behavior prevents conflicting applications from running on the same system.
For example, configure a test application on one system as the parent and the production application on another system as the child.

Dependency location: local, global, or remote dependencies

The relative location of the parent and child service groups determines whether the dependency between them is a local, global, or remote.

Local dependency
The parent group depends on the child group being online or offline on the same system.
Global dependency
An instance of the parent group depends on one or more instances of the child group being online on any system.
Remote dependency
An instance of parent group depends on one or more instances of the child group being online on any system other than the system on which the parent is online.

Dependency rigidity: soft, firm, or hard dependencies

The type of dependency defines the rigidity of the link between parent and child groups. A soft dependency means minimum constraints, whereas a hard dependency means maximum constraints

Soft dependency
Specifies the minimum constraints while bringing parent and child groups online. The only constraint is that the child group must be online before the parent group is brought online.
Note that VCS may not honor soft dependencies when either the hastop -local or the /etc/init.d/vcs stop are run. In this scenario, VCS takes both parent and child service groups offline in any order, without considering the group dependency.
For example, in an online local soft dependency, an instance of the child group must be online on the same system before the parent group can come online.
Soft dependency provides the following flexibility:
  • If the child group faults, VCS does not immediately take the parent offline. If the child group cannot fail over, the parent remains online.
  • When both groups are online, either group, child or parent, may be taken offline while the other remains online.
  • If the parent group faults, the child group may remain online.
  • When the link is created, the child group need not be online if the parent is online. However, when both groups are online, their online state must not conflict with the type of link.
Firm dependency
Imposes more constraints when VCS brings the parent or child groups online or takes them offline. In addition to the constraint that the child group must be online before the parent group is brought online, the constraints include:
  • If the child group faults, the parent is taken offline. If the parent is frozen at the time of the fault, the parent remains in its original state. If the child cannot fail over to another system, the parent remains offline.
  • If the parent group faults, the child group may remain online.
  • The child group cannot be taken offline if the parent group is online. The parent group can be taken offline while the child is online.
  • When the link is created, the parent group must be offline. However, if both groups are online, their online state must not conflict with the type of link.
Hard dependency
Imposes the maximum constraints when VCS brings the parent of child service groups online or takes them offline. For example:
  • If a child group faults, the parent is taken offline before the child group is taken offline. If the child group fails over, the parent fails over to another system (or the same system for a local dependency). If the child group cannot fail over, the parent group remains offline.
  • If the parent faults, the child is taken offline. If the child fails over, the parent fails over. If the child group cannot fail over, the parent group remains offline.

    Note   When the child faults, if the parent group is frozen, the parent remains online. The faulted child does not fail over.

The following restrictions apply when configuring a hard dependency:
  • Only online local hard dependencies are supported.
  • Only a single-level, parent-child relationship can be configured as a hard dependency.
  • Only one parent and one child group can be configured in a hard dependency.
  • Bringing the child group online does not automatically bring the parent online.
  • Taking the parent group offline does not automatically take the child offline.
  • Bringing the parent online is prohibited if the child is offline.