[ClusterLabs] Mixing globally-unique with non-globally-unique resources
Ken Gaillot
kgaillot at redhat.com
Tue May 14 10:05:47 EDT 2024
On Tue, 2024-05-14 at 13:56 +0200, Jochen wrote:
> I have the following use case: There are several cluster IP addresses
> in the cluster. Each address is different, and multiple addresses can
> be scheduled on the same node. This makes the address clone a
> globally-unique clone as far as I understood.
Actually each IP address would be a separate (uncloned) resource.
The IPaddr2 resource agent does support cloned IPs, but only using an
obsolete technology that's not around anymore. That technology allowed
a *single* IP address to be answered by any of a set of nodes
(effectively load-balancing by the client's address).
> Then I have one service per node which manages traffic for all
> addresses on a node where an address is active, which makes the
> service clone not-globally-unique. The service should only run if at
> least one address is active on the node, and there cannot be more
> than one instance of the service on each node.
>
> How would I create this pattern in Pacemaker?
>
What you want is an ordering constraint with the IP resources in a
resource set with require-all=false:
https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Explained/html/constraints.html#resource-sets
--
Ken Gaillot <kgaillot at redhat.com>
More information about the Users
mailing list