<div dir="ltr"><div>Hi Ken, </div><div><br></div><div>Thanks a lot for your quick response. As you guess, the interesting part is the port-check.</div><div><br></div><div>As I'm planning to work with Ceph cluster, I think there is any resource monitor for Ceph Monitor implemented yet.</div><div><br></div><div>Regarding your suggestions:</div><div><br></div><div><em>If for whatever reason, you can't put the service under cluster control</em></div><div class="gmail_extra">That would be perfect for me! But I don't know how to do it... :(</div><div class="gmail_extra"><br></div><div class="gmail_extra"><em>(1) write a dummy agent whose monitor action checks the port, and colocate the IP with that; </em><br></div><div class="gmail_extra">How can I do that, is there any tutorial?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><em>(2) have a script check the port and set a node attribute appropriately, and use a rule-based location constraint for the IP (this approach would be useful mainly if you already have some script doing a check).</em></div><div class="gmail_extra">How can I do that, is there any tutorial?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Sorry for my simple questions, I'm a basic pacemaker/corosync user, and I don't have experience developing new resource agents.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks a lot!</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-06 16:05 GMT+01:00 Ken Gaillot <span dir="ltr"><<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div class="gmail-HOEnZb"><div class="gmail-h5">On Tue, 2018-03-06 at 10:11 +0100, Oscar Segarra wrote:<br>
> Hi,<br>
><br>
> I'd like to recover this post in order to know if there is any way to<br>
> achieve this kind of simple HA system.<br>
><br>
> Thanks a lot.<br>
><br>
> 2017-08-28 4:10 GMT+02:00 Oscar Segarra <<a href="mailto:oscar.segarra@gmail.com">oscar.segarra@gmail.com</a>>:<br>
> > Hi,<br>
> ><br>
> > In Ceph, by design there is no single point of failure I terms of<br>
> > server roles, nevertheless, from the client point of view, it might<br>
> > exist.<br>
> ><br>
> > In my environment:<br>
> > Mon1: <a href="http://192.168.100.101:6789" target="_blank" rel="noreferrer">192.168.100.101:6789</a><br>
> > Mon2: <a href="http://192.168.100.102:6789" target="_blank" rel="noreferrer">192.168.100.102:6789</a><br>
> > Mon3: <a href="http://192.168.100.103:6789" target="_blank" rel="noreferrer">192.168.100.103:6789</a><br>
> ><br>
> > Client: 192.168.100.104<br>
> ><br>
> > I have created a line in /etc/festa referencing Mon but, of course,<br>
> > if Mon1 fails, the mount point gets stuck. <br>
> ><br>
> > I'd like to create a vip assigned to any host with tcp port 6789 UP<br>
> > and, in the client, mount the CephFS using that VIP.<br>
> ><br>
> > Is there any way to achieve this? <br>
> ><br>
> > Thanks a lot in advance! <br>
<br>
</div></div>The IP itself would be a standard floating IP address using the<br>
ocf:heartbeat:IPaddr2 resource agent. "Clusters from Scratch" has an<br>
example, though I'm sure you're familiar with that:<br>
<br>
<a href="http://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_
from_Scratch/_add_a_resource.html" target="_blank" rel="noreferrer">http://clusterlabs.org/<wbr>pacemaker/doc/en-US/Pacemaker/<wbr>1.1/html/Clusters_<br>
from_Scratch/_add_a_resource.<wbr>html</a><br>
<br>
The interesting part is making sure that port 6789 is responding. The<br>
usual design in these cases is to put the service that provides that<br>
port under cluster control; its monitor action would ensure the port is<br>
responding, and a standard colocation constraint would ensure the IP<br>
can only run when the service is up.<br>
<br>
If for whatever reason, you can't put the service under cluster<br>
control, I see two approaches: (1) write a dummy agent whose monitor<br>
action checks the port, and colocate the IP with that; or (2) have a<br>
script check the port and set a node attribute appropriately, and use a<br>
rule-based location constraint for the IP (this approach would be<br>
useful mainly if you already have some script doing a check).<br>
<span class="gmail-HOEnZb"><font color="#888888">--<br>
Ken Gaillot <<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>><br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank" rel="noreferrer">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank" rel="noreferrer">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank" rel="noreferrer">http://bugs.clusterlabs.org</a><br>
</font></span></blockquote></div><br></div></div>