The version 1 implementation of the ResourceManager, as well as only allowing ResourceAllocation across 2 ClusterNodes, used the ResourceGroup model.
The new ClusterResourceManager is taking the more flexible approach of using constraints (also known as dependencies).
Although some people may not wish to take advantage of this extra functionality, the old ResourceGroup model can easily be mapped to the new model but this will not be done internally to Heartbeat or in the provided command line interface AdminTools. Instead it is envisioned that a GUI will be made available that presents the configuration as a ResourceGroup to the user and creates the required constraints.
hadev 127.0.0.10 drbd:/mnt/web apache
Disclaimer: This is not how it is actually represented, it is for demonstration purposes only.
<resource name> { <resource type>, <resource arg(s)> { <node> = <priority>, ... } }
resource1 { IPAddr, 127.0.0.10 { hadev = 100, secondary = 10, tertiary = 1 } }
resource2 { drbd, /mnt/web { hadev = 100, secondary = 10 } }
resource3 { apache { hadev = 100, secondary = 10, tertiary = 1 } }
<constraint name> { <resource name>, <constraint type> { <constraint arg(s) - in this case another resource name> } }
constraint2_1 { resource2, same_node_after { resource1 } }
constraint3_2 { resource3, same_node_after { resource2 } }
Constraints fall into the following three categories.
Ordering constraints
These affect the order in which resources are started and stopped in the cluster.
Example: Start Apache after DRBD
Direct locational constraints
These affect where resources are run in the cluster. By default resources can not run anywhere and a constraint must be present to associate resources and nodes. It is possible to associate a resource with all nodes in the cluster - see the 3rd example below.
Examples:
MySQL can run on <any>
Indirect locational constraints
These determine where a resource is run in the cluster relative to other resources.
Examples:
Apache should not run on the same node as MySQL
See the CRM DTD for the specification of each constraint type.