Some cluster resources are dependent on other components or resources, and require that each component or resource are started in a specific order and run together on the same server. To simplify this configuration we support the concept of groups.
Groups have the following properties:
Resources are started in the order they appear in and stopped in the reverse order which they appear in.
If a resource in the group cannot run anywhere, then none of the resources located after that resource in the group is allowed to run.
Groups may only contain a collection of primitive cluster resources. To refer to the child of a group resource, use the child’s ID instead of the group’s.
Although it is possible to reference the group’s children in constraints, it is usually preferable to use the group’s name instead.
Stickiness is additive in groups. Every active
member of the group will contribute its stickiness value to the
group’s total. So if the default
resource-stickiness is 100 and a
group has seven members, five of which are active, then the group as
a whole will prefer its current location with a score of
500.
To enable resource monitoring for a group, you must configure monitoring separately for each resource in the group that you want monitored.
![]() | Empty Groups |
|---|---|
Groups must contain at least one resource, otherwise the configuration is not valid. | |
Procedure 4.9. Adding a Resource Group
Start the Linux HA Management Client and log in to the cluster as described in Section 4.1, “Linux HA Management Client”.
In the left pane, select and click +.
Enter a unique ID for the group.
Below , set the and click .
In the next step, you can add primitives as sub-resources for the group. These are created similar as described in Adding Primitive Resources.
If all parameters are set according to your wishes, click to finish the configuration of the primitive.
In the next window, you can continue adding sub-resources for the group by choosing again and clicking .
When you do not want to add more primitives to the group, click instead. The next window shows a summary of the parameters that you have already defined for that group. The and of the group are listed. The position of the resources in the tab represents the order in which the resources are started in the cluster.
As the order of resources in a group is important, use the and buttons to sort or resort the in the group.
If all parameters are set according to your wishes, click to finish the configuration of that group. The configuration dialog is closed and the main window shows the newly created or modified group.
Example 4.1. Resource Group for a Web Server
An example for a resource group is a Web server that requires an IP address and a file system. In this case each component is a separate cluster resource that is combined into a cluster resource group. The resource group would then run on a server or servers, and in case of a software or hardware malfunction, fail over to another server in the cluster the same as an individual cluster resource.
In Adding a Resource Group, you learned how to create a resource group. Let us assume you already have created a resource group like explained above. Adding Resources to an Existing Group shows you how to modify the group to match Example 4.1, “Resource Group for a Web Server”.
Procedure 4.10. Adding Resources to an Existing Group
Start the Linux HA Management Client and log in to the cluster as described in Section 4.1, “Linux HA Management Client”.
In the left pane, switch to the view and in the right pane, select the group to modify and click . The next window shows the basic group parameters and the meta attributes and primitives already defined for that resource.
Click the tab and click .
In the next dialog, set the following parameters to add an IP address as sub-resource of the group:
Enter a unique ID, for example,
my_ipaddress.
From the list, select as resource agent class.
As of your OCF resource agent, select .
From the list, select as resource agent.
Click .
In the tab, select the entry and click (or double-click the entry).
As , enter the desired IP address, for
example, 192.168.1.1.
Click and . The group configuration dialog shows the newly added primitive.
Add the next sub-resources (file system and Web server) by clicking again.
Set the respective parameters for each of the sub-resources similar to steps Step 4.a to Step 4.h, until you have configured all sub-resources for the group.
![]() |
As we configured the sub-resources already in the order in that they need to be started in the cluster, the order on the tab is already correct.
In case you need to change the resource order for a group, use the and buttons to resort the resources on the tab.
To remove a resource from the group, select the resource on the tab and click .
Click to finish the configuration of that group. The configuration dialog is closed and the main window shows the modified group.