<div dir="ltr"><div>Hello </div><div><br></div>Thank you for taking the time to respond. <div><br></div><div>In my setup the public IP is not on the box , the box is attached to a private network and packets to the public IP  I think are just forwarded to the private IP. </div><div><br></div><div>When I tried using the local private address as the bind address , public address as the member address and ran a tcp dump , both nodes are sending packets to each other over the public IP but they are responding to each other&#39;s private address Instead of just responding back to the address the packet arrived from. It looks like corosync is sending the IP its listening on , and the other node is trying to respond to it , and hence if corosync binds to a private address a node not in the same DC will not be able to respond to it. </div><div><br></div><div>Is this how corosync works ? </div><div><br></div><div>Is there a way to force the node to respond to the IP its receiving packets from ? or to broad cast its public IP rather than the private IP ? Would it be any better if I used corosync 2.X , for the same setup ?  </div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 13, 2016 at 12:41 AM, Klaus Wenninger <span dir="ltr">&lt;<a href="mailto:kwenning@redhat.com" target="_blank">kwenning@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/13/2016 09:30 AM, Jan Friesse wrote:<br>
&gt; neeraj ch napsal(a):<br>
&gt;&gt; Hello ,<br>
&gt;&gt;<br>
&gt;&gt; We are testing out corosync and pacemaker for DB high availability on<br>
&gt;&gt; the<br>
&gt;&gt; cloud. I was able to set up a cluster with in a DC using corosync 1.4<br>
&gt;&gt; and<br>
&gt;&gt; pacemaker 1.12. It works great and I wanted to try a cross DC cluster. I<br>
&gt;&gt; was using unicast as multicast was disabled by default.<br>
&gt;&gt;<br>
&gt;&gt; I was not sure how Corosync behaves with public IP&#39;s but I still went<br>
&gt;&gt; ahead<br>
&gt;&gt; and tried it with both public IP&#39;s as well as DNS names. These DNS names<br>
&gt;&gt; resolve as local IP when the other node is with in the same subnet.<br>
&gt;<br>
&gt; Every node has to be able to see every other node. So mixing of public<br>
&gt; and private ips is not going to work (with exception of special case<br>
&gt; where all private ips are in the same network). Also keep in mind<br>
&gt; config file has to be same on all nodes.<br>
<br>
</span>Guess reason is that corosync derives an ID from the IP.<br>
So the hostname has to resolve to the same IP on all nodes<br>
and under all circumstances.<br></blockquote><div>Oh Got It.  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; while I was using public IP&#39;s both the node inside the same subnet as<br>
&gt;&gt; well<br>
&gt;&gt; as outside were unable to connect, except for itself. While using DNS<br>
&gt;&gt; names<br>
&gt;&gt; the membership information showed the nodes within same subnet being<br>
&gt;&gt; connected to while the nodes outside were not connected<br>
&gt;<br>
&gt; This is somehow expected.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; My corosync config is as follows.<br>
&gt;&gt;<br>
&gt;&gt; totem {<br>
&gt;&gt;        version: 2<br>
&gt;&gt;        secauth: off<br>
&gt;&gt;        threads: 0<br>
&gt;&gt;        interface {<br>
&gt;&gt;<br>
&gt;&gt;                 member {<br>
&gt;&gt;                    memberaddr: &lt;public ip&gt;<br>
&gt;&gt;                 }<br>
&gt;&gt;                member {<br>
&gt;&gt;                    memberaddr: &lt;public ip&gt;<br>
&gt;&gt;                 }<br>
&gt;&gt;                 member {<br>
&gt;&gt;                    memberaddr: &lt;public ip&gt;<br>
&gt;&gt;                 }<br>
&gt;&gt;                 ringnumber: 0<br>
&gt;&gt;                 bindnetaddr: 172.31.0.0<br>
&gt;&gt;                 mcastport: 5405<br>
&gt;&gt;                 ttl: 1<br>
&gt;&gt;        }<br>
&gt;&gt;        transport: udpu<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; logging {<br>
&gt;&gt;        fileline: off<br>
&gt;&gt;        to_stderr: no<br>
&gt;&gt;        to_logfile: yes<br>
&gt;&gt;        to_syslog: yes<br>
&gt;&gt;        logfile: /var/log/cluster/corosync.log<br>
&gt;&gt;        debug: on<br>
&gt;&gt;        timestamp: on<br>
&gt;&gt;        logger_subsys {<br>
&gt;&gt;                 subsys: AMF<br>
&gt;&gt;                 debug: on<br>
&gt;&gt;        }<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; service {<br>
&gt;&gt;          # Load the Pacemaker Cluster Resource Manager<br>
&gt;&gt;          name: pacemaker<br>
&gt;&gt;          ver: 1<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; amf {<br>
&gt;&gt;        mode: disabled<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I am checking membership information by using corosync-objctl. I have<br>
&gt;&gt; also<br>
&gt;&gt; tried using public ip as the bind address , that makes the membership<br>
&gt;&gt; from<br>
&gt;<br>
&gt; Just to make sure. This &quot;public&quot; ip is really ip of given machine?<br>
&gt;<br>
&gt;&gt; 1 to 0 as it doesn&#39;t add itself.<br>
&gt;&gt;<br>
&gt;&gt; If any one has any suggestion / advice on how to debug or what I am<br>
&gt;&gt; doing<br>
&gt;&gt; wrong . Any help would be very appreciated.<br>
&gt;&gt;<br>
&gt;&gt; Thank you<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt;&gt; <a href="http://clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
&gt;&gt;<br>
&gt;&gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt;&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
&gt;&gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt; <a href="http://clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br></div></div>