<div dir="ltr">Would like to validate my final config.<div><br></div><div>As I mentioned earlier, I will be having (upto) 5 active servers and 1 standby server.</div><div>The standby server should take up the role of active that went down. Each active has some unique configuration that needs to be preserved.</div><div><br></div><div>1) So I will create total 5 groups. Each group has a "heartbeat::IPaddr2 resource (for virtual IP) and my custom resource. </div><div>2) The virtual IP needs to be read inside my custom OCF agent, so I will make use of attribute reference and point to the value of IPaddr2 inside my custom resource to avoid duplication.</div><div>3) I will then configure location constraint to run the group resource on 5 active nodes with higher score and lesser score on standby.</div><div>For e.g. </div><div>Group              Node            Score</div><div>---------------------------------------------</div><div>MyGroup1        node1           500 </div><div>MyGroup1        node6           0<br></div><div><div><br></div><div><div>MyGroup2        node2           500 </div><div>MyGroup2        node6           0<br></div><div></div></div><div>..<br></div></div><div>MyGroup5        node5           500 <br></div><div><div>MyGroup5        node6           0</div></div><div><br></div><div>4) Now if say node1 were to go down, then stop action on node1 will first get called. Haven't decided if I need to do anything specific here.</div><div>5) But when the start action of node 6 gets called, then using crm command line interface, I will modify the above config to swap node 1 and node 6.</div><div>i.e. </div><div>MyGroup1        node6           500 <br></div><div><div>MyGroup1        node1           0<br></div><div><div><br></div><div><div>MyGroup2        node2           500 </div><div>MyGroup2        node1           0<br></div><div><br></div><div>6) To do the above, I need the newly active and newly standby node names to be passed to my start action. What's the best way to get this information inside my OCF agent?</div><div>7) Apart from node name, there will be other information which I plan to pass by making use of node attributes. What's the best way to get this information inside my OCF agent? Use crm command to query?</div><div><br></div><div>Thank You.</div><div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 22, 2015 at 9:44 PM, Nikhil Utane <span dir="ltr"><<a href="mailto:nikhil.subscribed@gmail.com" target="_blank">nikhil.subscribed@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks to you Ken for giving all the pointers.<div>Yes, I can use service start/stop which should be a lot simpler. Thanks again. :)<span class=""><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 22, 2015 at 9:29 PM, Ken Gaillot <span dir="ltr"><<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 12/22/2015 12:17 AM, Nikhil Utane wrote:<br>
> I have prepared a write-up explaining my requirements and current solution<br>
> that I am proposing based on my understanding so far.<br>
> Kindly let me know if what I am proposing is good or there is a better way<br>
> to achieve the same.<br>
><br>
> <a href="https://drive.google.com/file/d/0B0zPvL-Tp-JSTEJpcUFTanhsNzQ/view?usp=sharing" rel="noreferrer" target="_blank">https://drive.google.com/file/d/0B0zPvL-Tp-JSTEJpcUFTanhsNzQ/view?usp=sharing</a><br>
><br>
> Let me know if you face any issue in accessing the above link. Thanks.<br>
<br>
</span>This looks great. Very well thought-out.<br>
<br>
One comment:<br>
<br>
"8. In the event of any failover, the standby node will get notified<br>
through an event and it will execute a script that will read the<br>
configuration specific to the node that went down (again using<br>
crm_attribute) and become active."<br>
<br>
It may not be necessary to use the notifications for this. Pacemaker<br>
will call your resource agent with the "start" action on the standby<br>
node, after ensuring it is stopped on the previous node. Hopefully the<br>
resource agent's start action has (or can have, with configuration<br>
options) all the information you need.<br>
<br>
If you do end up needing notifications, be aware that the feature will<br>
be disabled by default in the 1.1.14 release, because changes in syntax<br>
are expected in further development. You can define a compile-time<br>
constant to enable them.<br>
<div><div><br></div></div></blockquote></div></div></span></div></div>
</blockquote></div><br></div>