<div dir="ltr">Hi.<div>I'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'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'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 'not running' (7): call=108, status=complete, exitreason='none',</div><div>    last-rc-change='Tue May 30 17:56:46 2017', 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-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-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'd like to know what'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><div><br></div>-- <br><div class="gmail_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>
</div></div>