id
is used.
Example 10.5. Some constraints involving clones
<constraints> <rsc_location id="clone-prefers-node1" rsc="apache-clone" node="node1" score="500"/> <rsc_colocation id="stats-with-clone" rsc="apache-stats" with="apache-clone"/> <rsc_order id="start-clone-then-stats" first="apache-clone" then="apache-stats"/> </constraints>
apache-stats
will wait until all copies of apache-clone
that need to be started have done so before being started itself. Only if no copies can be started will apache-stats
be prevented from being active. Additionally, the clone will wait for apache-stats
to be stopped before stopping itself.
A
is colocated with another clone B
, the set of allowed locations for A
is limited to nodes on which B
is (or will be) active. Placement is then performed normally.