Product SiteDocumentation Site

5.3. Specifying the Order in which Resources Should Start/Stop

Ordering constraints tell the cluster the order in which resources should start.

Important

Ordering constraints affect only the ordering of resources; they do not require that the resources be placed on the same node. If you want resources to be started on the same node and in a specific order, you need both an ordering constraint and a colocation constraint (see Section 5.4, “Placing Resources Relative to other Resources”), or alternatively, a group (see Section 9.1, “Groups - A Syntactic Shortcut”).

5.3.1. Ordering Properties

Table 5.2. Properties of a rsc_order Constraint

Field Default Description
id
A unique name for the constraint
first
Name of the resource that the then resource depends on
then
Name of the dependent resource
first-action
start
The action that the first resource must complete before then-action can be initiated for the then resource. Allowed values: start, stop, promote, demote.
then-action
value of first-action
The action that the then resource can execute only after the first-action on the first resource has completed. Allowed values: start, stop, promote, demote.
kind
How to enforce the constraint. Allowed values:
  • Optional: Just a suggestion. Only applies if both resources are executing the specified actions. Any change in state by the first resource will have no effect on the then resource.
  • Mandatory: Always. If first does not perform first-action, then will not be allowed to performed then-action. If first is restarted, then (if running) will be stopped beforehand and started afterward.
  • Serialize: Ensure that no two stop/start actions occur concurrently for the resources. First and then can start in either order, but one must complete starting before the other can be started. A typical use case is when resource start-up puts a high load on the host.
symmetrical
TRUE for Mandatory and Optional kinds. FALSE for Serialize kind.
If true, the reverse of the constraint applies for the opposite action (for example, if B starts after A starts, then B stops before A stops). Serialize orders cannot be symmetrical.

Promote and demote apply to the master role of promotable resources.