5.3 Dependency Management
When a group is brought online or taken offline, the resources in the group should be defined the order in which the resources are brought online or taken offline and these are related to each other.
For an instance, an IP address cannot be assigned properly without network interface card and a database service cannot be online properly without mounted disk volume.
In MCCS, dependency is defined as a hierarchy relationship among resources. MCCS can define this antecedent-consequent logical relationship as the hierarchy involving parents and children. A resource that depends on other resources is a parent which is located above, whereas a resource on which the other resources depend is a child which is located below.
These parent/child resources are linked with each other by rule. MCCS brings the parent/child resource online or takes it offline when one of the linked resources faults.
When MCCS brings online a group, a child resource to be online before any parent resource can be brought online. Of course, when the group is taken offline, it will be the opposite way around.
Table of Contents
[Figure] Online/Offline Sequence of Dependent Resources When Starting or Terminating a Group
Dependency Configuration
To define this dependency among resources, configure this link in the ‘Resource Dependency’ view from detailed information panel of MCCS console.
[Figure] Dependency relationship
You can simply configure the dependency link of these resources in a tree form.You can see the dependency among resources intuitively from the view above. The IP address resource as a parent depends on the NIC resource as its child. The application resource as a parent depends on the IP address resource as its child. Therefore, some resources as like IP address of above example can be both child and parent relatively.
As described before, When a single resource is failed MCCS failover all of the resources in a group. Therefore, when these are linked to one another as dependency rule and tied up together as a group, they can provide proper application service.
When you configure parent-child dependency link between two resources, there are 2 levels and the maximum level can be checked on value of 'MaxDependencyLevel' of group attribute.
Link
[Figure] Setting Link
The above screen shows how to set the dependency link between the process resource (parent) and the IP address resource (child). The process resource (parent) depends on the IP address resource (parent).
In the Group tab of the configuration tree of MCCS console, select the Group–> the 'Resource dependency' tab from detailed information panel.
On the right palette screen, select 'Create Dependency'.
Select the parent resource (e.g. App) first and then select the child resource (e.g. IP address), then dependency link will be set.
※ For linking process, first selected resource is parent resource and the one selected later is the child resource.
Unlink
[Figure] Setting Unlink
When you unlink the dependency, select 'Select' icon from the palette.
Select a dependency link to delete.
On the selected link, right click with your mouse button and select 'Unlink' from pop up menu and click 'OK'.
Dependency Attribute
You can review and edit a dependency attribute when you select a dependency among resources.
There are 'OnlineDependency' and 'OfflineDependency' in the dependency attribute.
This is applied when you bring online and take offline a resource within 'Restartlimit'. (For more details about Restartlimit, Please refer to "7. Resource" in this manual.)
Attribute | Description | Type | Default | Edit | Note |
|---|---|---|---|---|---|
OnlineDependency | This indicates that the child is also brought online or not when a resource online is initiated. | STRING | STRONG | O |
|
OfflineDependency | This indicates that the parent is also taken offline or not when a resource offline is initiated. | STRING | STRONG | O |
|
Basic Dependency Cases among resources
Following are the general cases of dependency.
Network Interface card(NIC) Resource, IP address Resource
A NIC must be online first to assign an IP address. It is impossible to assign an IP address without a NIC. Accordingly, these two resources are dependent on each other with the network interface card being the child and the IP being the parent.
When dependency is configured between both resources, MCCS checks NIC resource is online state before it bring online an IP address resource.
Disk Resource, IP address Resource, Application Resource (ex: DB)
Most applications may stores their data on the disks (storage). Accordingly, applications are dependent on disks.
For an instance, database service like MS-SQL or Oracle is not running properly without disk which contains data records. Therefore, both resources are dependent on each other with the database service being the parent and the disk becoming the child resource. If a client needs an IP address for accessing database, both resources are dependent on each other with the database service being the parent and the IP address being the child.
On the basis of the dependency rule, MCCS will bring online the database service after checking whether the IP address and disk resources were brought online properly when the group is brought online. Accordingly, database service must depend on both IP address and disk resources at the same time to provide proper service.
If dependency is configured according to the relationship explained above, following diagram can be obtained.
[Figure] Dependency of database application
Actions due to dependency
Online/Offline of the group is performed from bottom to top according to the dependency in case of online, and from top to bottom in case of offline.
Following are a few examples how MCCS manages the resources after dependency link among the resources when a resource is failed. Attributes and state of resources are defined as the figure below.
[Figure] Resource State Information Charts
Action by dependency attribute
OnlineDependency
[Figure] Example of bringing online of resource r1(OnlineDependency attribute of D1 between r1 and r2 is STRONG, OnlineDependency attribute of D2 between r1 and r3 is WEAK.)