<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">You should not clone IPaddr2 resource.</div><div dir="auto">Clone means that to run the resource at same time on both nodes, so these nodes will have same duplicated IP address on a network.</div><div dir="auto"><br></div>Specifically, you need to configure a IPaddr2 resource runs on a node which cloned nginx is running, by collocation constraint.<div dir="auto"><br></div><div dir="auto">However please note that does not work as a load-balancer.</div><div dir="auto"><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Takehiro</div><div dir="auto"><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">2017/05/31 午前1:48 &quot;Przemyslaw Kulczycki&quot; &lt;<a href="mailto:upr@avaleo.net">upr@avaleo.net</a>&gt;:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi.<div>I&#39;m trying to setup a 2-node corosync+pacemaker cluster to function as an active-active setup for nginx with a shared IP.</div><div><br></div><div>I&#39;ve discovered (much to my disappointment) that every time I restart one node or put it in standby, the second instance of the cloned IP gets moved to the first node and doesn&#39;t go back once the second node is available, even though I have set stickiness to 0.</div><div><br></div><div><div>[upr@webdemo3 ~]$ sudo pcs status</div><div>Cluster name: webdemo_cluster2</div><div>Stack: corosync</div><div>Current DC: webdemo3 (version 1.1.15-11.el7_3.4-e174ec8) - partition with quorum</div><div>Last updated: Tue May 30 18:40:18 2017          Last change: Tue May 30 17:56:24 2017 by hacluster via crmd on webdemo4</div><div><br></div><div>2 nodes and 4 resources configured</div><div><br></div><div>Online: [ webdemo3 webdemo4 ]</div><div><br></div><div>Full list of resources:</div><div><br></div><div> Clone Set: ha-ip-clone [ha-ip] (unique)</div><div>     ha-ip:0    (ocf::heartbeat:IPaddr2):       Started webdemo3</div><div>     ha-ip:1    (ocf::heartbeat:IPaddr2):       Started webdemo3</div><div> Clone Set: ha-nginx-clone [ha-nginx] (unique)</div><div>     ha-nginx:0 (ocf::heartbeat:nginx): Started webdemo3</div><div>     ha-nginx:1 (ocf::heartbeat:nginx): Started webdemo4</div><div><br></div><div>Failed Actions:</div><div>* ha-nginx:0_monitor_20000 on webdemo3 &#39;not running&#39; (7): call=108, status=complete, exitreason=&#39;none&#39;,</div><div>    last-rc-change=&#39;Tue May 30 17:56:46 2017&#39;, queued=0ms, exec=0ms</div><div><br></div><div><br></div><div>Daemon Status:</div><div>  corosync: active/enabled</div><div>  pacemaker: active/enabled</div><div>  pcsd: active/enabled</div><div><br></div><div><div>[upr@webdemo3 ~]$ sudo pcs config --full</div><div>Cluster Name: webdemo_cluster2</div><div>Corosync Nodes:</div><div> webdemo3 webdemo4</div><div>Pacemaker Nodes:</div><div> webdemo3 webdemo4</div><div><br></div><div>Resources:</div><div> Clone: ha-ip-clone</div><div>  Meta Attrs: clone-max=2 clone-node-max=2 globally-unique=true <b>stickiness=0</b></div><div>  Resource: ha-ip (class=ocf provider=heartbeat type=IPaddr2)</div><div>   Attributes: ip=10.75.39.235 cidr_netmask=24 clusterip_hash=sourceip</div><div>   Operations: start interval=0s timeout=20s (ha-ip-start-interval-0s)</div><div>               stop interval=0s timeout=20s (ha-ip-stop-interval-0s)</div><div>               monitor interval=10s timeout=20s (ha-ip-monitor-interval-10s)</div><div> Clone: ha-nginx-clone</div><div>  Meta Attrs: globally-unique=true clone-node-max=1</div><div>  Resource: ha-nginx (class=ocf provider=heartbeat type=nginx)</div><div>   Operations: start interval=0s timeout=60s (ha-nginx-start-interval-0s)</div><div>               stop interval=0s timeout=60s (ha-nginx-stop-interval-0s)</div><div>               monitor interval=20s timeout=30s (ha-nginx-monitor-interval-<wbr>20s)</div><div><br></div><div>Stonith Devices:</div><div>Fencing Levels:</div><div><br></div><div>Location Constraints:</div><div>Ordering Constraints:</div><div>Colocation Constraints:</div><div>  ha-ip-clone with ha-nginx-clone (score:INFINITY) (id:colocation-ha-ip-ha-nginx-<wbr>INFINITY)</div><div>Ticket Constraints:</div><div><br></div><div>Alerts:</div><div> No alerts defined</div><div><br></div><div>Resources Defaults:</div><div> resource-stickiness: 100</div><div>Operations Defaults:</div><div> No defaults set</div><div><br></div><div>Cluster Properties:</div><div> cluster-infrastructure: corosync</div><div> cluster-name: webdemo_cluster2</div><div> dc-version: 1.1.15-11.el7_3.4-e174ec8</div><div> have-watchdog: false</div><div> last-lrm-refresh: 1496159785</div><div> no-quorum-policy: ignore</div><div> stonith-enabled: false</div><div><br></div><div>Quorum:</div><div>  Options:</div></div><div><br></div><div>Am I doing something incorrectly?</div><div><br></div><div>Additionally, I&#39;d like to know what&#39;s the difference between these commands:</div><div><p style="margin:10px 0px 0px;padding:0px;color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px">sudo pcs resource update ha-ip-clone stickiness=0</p><p style="margin:10px 0px 0px;padding:0px;color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px">sudo pcs resource meta ha-ip-clone resource-stickiness=0</p></div><div><br></div><div>They seem to set the same thing, but there might be a subtle difference.</div><font color="#888888"><div><br></div>-- <br><div class="m_-2628345293405644675gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px"><div dir="ltr"><div dir="ltr">Best Regards<br> <br>Przemysław Kulczycki<br>System administrator<br>Avaleo<br><br>Email: <a href="mailto:upr@avaleo.net" style="color:rgb(17,85,204)" target="_blank">upr@avaleo.net</a></div></div></div></div></div></div></div>
</font></div></div>
<br>______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.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>
<br></blockquote></div><br><br></div></div></div></div>