[ClusterLabs] Question about IPaddr2 & redis heartbeat, do they coordinate?

Ken Gaillot kgaillot at redhat.com
Fri Feb 14 09:46:36 EST 2020


On Fri, 2020-02-14 at 12:09 +0900, steven prothero wrote:
> Greetings,
> 
> Hello, I am new to pacemaker and learning much from the online
> documentation, searching on google, etc but have a specific question
> I
> am not sure about...
> 
> My setup is two servers and the focus is redis.
> 
> We use the heartbeat/IPaddr2 to update the VIP as needed, and the
> redis heartbeat to manage who is redis master...  Everything seems to
> work nicely.
> 
> The boss requested I change the system to have Redis work first, if
> trouble switch & shutdown etc and then the VIP will switch after. How
> would one heartbeat wait for the other to finish? Is that a bad/good
> idea?
> 
> As I am learning this all, from what I understand I think the two
> heartbeats are running in parallel and not coordinating together.
> Perhaps the VIP is switched quickly while the redis switch takes
> longer due to it negotiating a bit & dumping the database to disk and
> then shutting down..?
> 
> I researched the "ordering" but I think that is more about what
> services load in first so doesn't help me with this situation.
> 
> Appreciate very much any thoughts about this.
> 
> Cheers
> 
> Steve

Hi,

You most likely want to put redis and the IP in a group. That is the
same as setting both an ordering constraint (to make sure one waits for
the other to be successfully started before starting itself) and a
colocation constraint (to make sure they both start on the same node).

Whether the IP is first or last depends on how redis binds to addresses
and how you want the service to behave. If redis binds to the wildcard
address, then it doesn't matter whether the IP starts before or after,
so you can choose based on whether you want the IP to be functional
only if redis is also functional, or you want the IP to be usable for
other purposes even if redis is down. If redis binds to the specific
IP, then the IP must be first.
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list