rsc-role
and/or with-rsc-role
(for colocation constraints) and first-action
and/or then-action
(for ordering constraints) are used.
Field | Description |
---|---|
rsc-role |
An additional attribute of colocation constraints that specifies the role that rsc must be in.
Allowed values: Started, Master, Slave
|
with-rsc-role |
An additional attribute of colocation constraints that specifies the role that with-rsc must be in.
Allowed values: Started, Master, Slave
|
first-action |
An additional attribute of ordering constraints that specifies the action that the first resource must complete before executing the specified action for the then resource.
Allowed values: start, stop, promote, demote
|
then-action |
An additional attribute of ordering constraints that specifies the action that the then resource can only execute after the first-action on the first resource has completed.
Allowed values: start, stop, promote, demote. Defaults to the value (specified or implied) of first-action
|
with-rsc
clone is (or will be) in the specified role. Allocation is then performed as-per-normal.
<constraints> <rsc_location id="db-prefers-node1" rsc="database" node="node1" score="500"/> <rsc_colocation id="backup-with-db-slave" rsc="backup" with-rsc="database" with-rsc-role="Slave"/> <rsc_colocation id="myapp-with-db-master" rsc="myApp" with-rsc="database" with-rsc-role="Master"/> <rsc_order id="start-db-before-backup" first="database" then="backup"/> <rsc_order id="promote-db-then-app" first="database" first-action="promote" then="myApp" then-action="start"/> </constraints>