[ClusterLabs] Node attributes
kgaillot at redhat.com
Thu May 19 11:04:08 EDT 2016
On 05/18/2016 10:49 PM, H Yavari wrote:
> How can I define a constraint for two resource based on one nodes
> For example resource X and Y are co-located based on node attribute Z.
High-level tools such as pcs and crm provide a simpler interface, but
the concepts will be the same.
This works for location constraints, not colocation, but you can easily
accomplish what you want. If your goal is that X and Y each can only run
on a node with attribute Z, then set up a location constraint for each
one using the appropriate rule. If you goal is that X and Y must be
colocated together, on a node with attribute Z, then set up a regular
colocation constraint between them, and a location constraint for one of
them with the appropriate rule; or, put them in a group, and set up a
location constraint for the group with the appropriate rule.
More information about the Users