Language and Page Formatting Options
Appendix C. HA Resource Behavior
This appendix describes common behavior of HA resources. It is meant to provide ancillary information that may be helpful in configuring HA services. You can configure the parameters with luci or by editing
/etc/cluster/cluster.conf. For descriptions of HA resource parameters, see Appendix B, HA Resource Parameters. To understand resource agents in more detail you can view them in
/usr/share/clusterof any cluster node.
To fully comprehend the information in this appendix, you may require detailed understanding of resource agents and the cluster configuration file,
An HA service is a group of cluster resources configured into a coherent entity that provides specialized services to clients. An HA service is represented as a resource tree in the cluster configuration file,
/etc/cluster/cluster.conf(in each cluster node). In the cluster configuration file, each resource tree is an XML representation that specifies each resource, its attributes, and its relationship among other resources in the resource tree (parent, child, and sibling relationships).
Because an HA service consists of resources organized into a hierarchical tree, a service is sometimes referred to as a resource tree or resource group. Both phrases are synonymous with HA service.
At the root of each resource tree is a special type of resource — a service resource. Other types of resources comprise the rest of a service, determining its characteristics. Configuring an HA service consists of creating a service resource, creating subordinate cluster resources, and organizing them into a coherent entity that conforms to hierarchical restrictions of the service.
This appendix consists of the following sections:
The sections that follow present examples from the cluster configuration file,
/etc/cluster/cluster.conf, for illustration purposes only.
C.1. Parent, Child, and Sibling Relationships Among Resources
A cluster service is an integrated entity that runs under the control of
rgmanager. All resources in a service run on the same node. From the perspective of
rgmanager, a cluster service is one entity that can be started, stopped, or relocated. Within a cluster service, however, the hierarchy of the resources determines the order in which each resource is started and stopped.The hierarchical levels consist of parent, child, and sibling.
Example C.1, “Resource Hierarchy of Service foo” shows a sample resource tree of the service foo. In the example, the relationships among the resources are as follows:
fs:myfs(<fs name="myfs" ...>) and
ip:10.1.1.2(<ip address="10.1.1.2 .../>) are siblings.
fs:myfs(<fs name="myfs" ...>) is the parent of
script:script_child(<script name="script_child"/>) is the child of
fs:myfs(<fs name="myfs" ...>).
Example C.1. Resource Hierarchy of Service foo
<service name="foo" ...> <fs name="myfs" ...> <script name="script_child"/> </fs> <ip address="10.1.1.2" .../> </service>
The following rules apply to parent/child relationships in a resource tree:
- Parents are started before children.
- Children must all stop cleanly before a parent may be stopped.
- For a resource to be considered in good health, all its children must be in good health.
When configuring a dependency tree for a cluster service that includes a floating IP address resource, you must configure the IP resource as the first entry and not as the child of another resource.