[Pacemaker] Inter-resource communication.

Vladislav Bogdanov bubble at hoster-ok.com
Fri Sep 27 01:18:38 EDT 2013


26.09.2013 17:55, Dermot Tynan wrote:
> I've tried Googling for this, with little success. Wondering if someone
> here can help.
> 
> I am operating Pacemaker in a clone configuration with multiple nodes
> (usually between 4 and 6).  In the event that one of the nodes fails, I
> want one of the remaining nodes to perform a database update (the DB is
> in its own cluster elsewhere).
> 
> Currently, I use a resource agent which takes the notify-stop message
> and updates the DB, but this runs on all of the remaining nodes.
> 
> The two solutions that come to mind are a) to only do the update if the
> resource agent is running on the Designated Controller, but this means
> the agents need to probe around to find out which node is the DC. b)
> involves creating a new, single (manager) resource which can run on any
> one of the nodes, and which has responsibility for making the DB update.
> The problem here is synchronising the notify-stop messages sent to the
> clone resources, and somehow getting that message to the manager resource.
> 
> I'm also concerned about race conditions where either the DC or the
> Manager resource were on the failed node. If the clone notification
> happens before the DC or the Manager has been moved to a new node, they
> won't update the database.
> 
> Any thoughts?  Is there a better way to ensure that only one of the
> surviving members of the clone cluster does the DB update? Thanks.

Did you consider using master/slave (ms) resource instead of clone?
ms has all clone properties (including notifications), but some (usually
1) instances can be promoted to a Master state. imho that is what you
need. Of course you need to enhance/rewrite your resource agent to be
able to operate in ms mode.

Vladislav





More information about the Pacemaker mailing list