[ClusterLabs] Antw: Interacting with Pacemaker from my code

Andrei Borzenkov arvidjaar at gmail.com
Tue Jul 16 05:54:32 EDT 2019

On Tue, Jul 16, 2019 at 11:01 AM Nishant Nakate <technonsquare at gmail.com> wrote:
>> >
>> > I will give you a quick overview of the system. There would be 3 nodes configured in a cluster. One would act as a leader and others as followers. Our system would be actively running on all the three nodes and serve external services assigned to them. On top of that, the Leader would have some services running. In case the leader node (DC) fails, load of failed leader needs to be distributed among followers. One should get elected as next leader and start the additional services the previous leader was running.
>> >
>> > In this case, a our system daemon running on the next node (designated as new coordinater) needs to know that DC has changed and start the additional services. Hope this clarifies my need.
>> No, it does not. You still did not explain why your service must run
>> on the node that currently has DC role. You either misunderstand what
>> DC is or you use "DC" for something that is not pacemaker Designated
>> Coordinator.
>> The behavior you describe is default pacemaker behavior - resource
>> will run on one node and will be restarted on another node in case of
>> failures (node or resource). No need to do anything special.
> I somehow missed pacemaker behavior you mentioned in your second point. May be because my knowledge of resource agents is not enough. Having my processes as resources automatically handled by pace maker will workout. I will need to find out more on making my services (written in CPP) resource agents for pacemaker.  Any pointers on this ?

You should really start with pacemaker Cluster from Scratch document
which gives you basic overview of pacemaker architecture. Otherwise if
your program already has initscript or systemd unit you can simply use
them "as is" for quick integration. Or you can use "anything" resource
agent that starts arbitrary program and monitors that process is still

More information about the Users mailing list