Configure resource execution sequences
To determine the order in which the resources run, you must configure an ordering constraint.
The following shows the format for the command to configure an ordering constraint.
# pcs constraint order [action] resource_id then [action] resource_id [options]
For example the following command configures an ordering constraint to ensure that the resource firstresource starts first, before the resource secondresource.
# pcs constraint order start firstresource then secondresource
The following table summarizes the properties and options for configuring ordering constraints.
| Field | Description |
|---|---|
|
resource_id |
The name of a resource on which an action is performed. |
|
action |
The action to be ordered on the resource. Possible values of the action property are as follows: * * * * If no action is specified, the default action is |
|
|
How to enforce the constraint. The possible values of the * * * |
|
|
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). Ordering constraints for which |
- Displaying ordering constraints
-
The following command lists all current ordering constraints.
# pcs constraint order [config]You can display all current location, order, and colocation constraints with the following command. To show the internal constraint IDS, specify the
--fulloption.# pcs constraint [config] [--full]By default, listing resource constraints does not display expired constraints. To include expired constraints in the listing, use the
--alloption of thepcs constraintcommand. This will list expired constraints, noting the constraints and their associated rules as(expired)in the display.The following command lists the constraints that reference specific resources.
# pcs constraint ref resource ... - Removing resources from an ordering constraint
-
Use the following command to remove resources from any ordering constraint.
# pcs constraint order remove resource1 [resourceN]...