<div dir="ltr"><div dir="ltr"><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 16, 2019 at 11:33 AM Ulrich Windl <<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de" target="_blank">Ulrich.Windl@rz.uni-regensburg.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>>> Nishant Nakate <<a href="mailto:technonsquare@gmail.com" target="_blank">technonsquare@gmail.com</a>> schrieb am 16.07.2019 um 05:37 in<br>
Nachricht<br>
<CANTAVSkfNnx=ZQv+UftaKs76Htk3VU+kO=<a href="mailto:bqHrOj4ssZx%2BOu4A@mail.gmail.com" target="_blank">bqHrOj4ssZx+Ou4A@mail.gmail.com</a>>:<br>
> Hi All,<br>
> <br>
> I am new to this community and HA tools. Need some guidance on my current<br>
> handling pacemaker.<br>
> <br>
> For one of my projects, I am using pacekmaker for high availability.<br>
> Following the instructions provided in setup document, I am able to create<br>
> a new cluster with three nodes. Tested the failover and it works as<br>
> expected. Now, I need to run our own code on this nodes. I am going to use<br>
> Active-Pasive topology for our system architecture.<br>
> <br>
> I would like to know, how can I detect from my code if DC has changed ? So<br>
> that tools running on new DC can take over the controll of application<br>
> logic.<br>
<br>
Why would you need that? crm_mon shows where ther DC is.<br>
<br></blockquote><div>Thanks you Ulrich for your quick response.</div><div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>AFAIK, crm_mon (or dcs) needs to be run from command line. Are you suggesting that I create a service which runs crm_mon and parse the ourput in a loop to check changes in DC/resources ?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Also, how to configure my processes (tools) as resources so that Pacemaker<br>
> can make them HA.<br>
<br>
You'll have to write an RA (resource agent) at least, but more importantly the application has the be designed for HA to be effective.<br></blockquote><div>We are currently designing the services which are all stateless. If you have any quick suggestions to be considered, please let me know. Also, what type of RA would be helpful in this case. My services would be written in C++. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> <br>
> Please let me know if you need any clarification or any other information.<br>
> <br>
> Thanks in advance !!!<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" rel="noreferrer" target="_blank">https://www.clusterlabs.org/</a><br>
</blockquote></div></div></div>