[ClusterLabs] One cluster with two groups of nodes

Alberto Mijares amijaresp at gmail.com
Thu Nov 9 16:34:35 EST 2017


>
> The first thing I'd mention is that a 6-node cluster can only survive
> the loss of two nodes, as 3 nodes don't have quorum. You can tweak that
> behavior with corosync quorum options, or you could add a quorum-only
> node, or use corosync's new qdevice capability to have an arbiter node.
>
> Coincidentally, I recently stumbled across a long-time Pacemaker
> feature that I wasn't aware of, that can handle this type of situation.
> It's not documented yet but will be when 1.1.18 is released soon.
>
> Colocation constraints may take a "node-attribute" parameter, that
> basically means, "Put this resource on a node of the same class as the
> one running resource X".
>
> In this case, you might set a "group" node attribute on all nodes, to
> "1" on the three primary nodes and "2" on the three failover nodes.
> Pick one resource as your base resource that everything else should go
> along with. Configure colocation constraints for all the other
> resources with that one, using "node-attribute=group". That means that
> all the other resources must be one a node with the same "group"
> attribute value as the node that the base resource is running on.
>
> "node-attribute" defaults to "#uname" (node name), this giving the
> usual behavior of colocation constraints: put the resource only on a
> node with the same name, i.e. the same node.
>
> The remaining question is, how do you want the base resource to fail
> over? If the base resource can fail over to any other node, whether in
> the same group or not, then you're done. If the base resource can only
> run on one node in each group, ban it from the other nodes using
> -INFINITY location constraints. If the base resource should only fail
> over to the opposite group, that's trickier, but something roughly
> similar would be to prefer one node in each group with an equal
> positive score location constraint, and migration-threshold=1.
> --
> Ken Gaillot <kgaillot at redhat.com>


Thank you very very much for this. I'm starting some tests in my lab tonight.

I'll let you know my results and I hope I can count on you if a get
lost in the way.

BTW, every resource is supposed to run only on its designated node
with a group. In example: if nginx normally runs on A1 and it MUST
failover to B1. The same for every resource.

Best regards,


Alberto Mijares




More information about the Users mailing list