<div dir="ltr">(I'm a bit confused because I received an auto-reply form <a href="mailto:pacemaker-bounces@oss.clusterlabs.org">pacemaker-bounces@oss.clusterlabs.org</a> saying this list is inactive now but I just received a digest with my mail. I happens that I have resent the email to the new list with a bit more information, which was missing in the first message. So here it is that extra bit, anyway).<br><br><div>I also have noticed this pattern (with both STONITH resources running):<br></div><div>1. With the cluster running without errors, I run "stop docker" in node cluster-a-1. <br></div><div>2. This leads to the vCenter STONITH to act as expected.<br></div><div>3. After the cluster is running again without errors, I run again "stop docker" in node cluster-a-1.<br></div>4.
Now, the vCenter STONITH doesn't run and, instead, it is the IPMI
STONITH that runs. This is unexpected for me, as I was expecting to see
the vCenter STONITH to run again.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 4:20 PM, Jorge Lopes <span dir="ltr"><<a href="mailto:jmclopes@gmail.com" target="_blank">jmclopes@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"><div>Hi all.<br><br></div>I'm having difficulties orchestrating two STONITH devices in my cluster. I have been struggling with this in past days and I need some help, please.<br><div><div><div><br>A simplified version of my cluster and its goals is as follows:<br>- The cluster has two physical servers, each with two nodes (VMWare virtual machines): overall, there are 4 nodes in this simplified version.<br>- There are two resource groups: group-cluster-a and group-cluster-b.<br>- To achieve a good CPU balance in the physical servers, the cluster is asymmetric, with one group running in one server and the other group running on the other server.<br>- If the VM of one host becomes not usable, then its resources are started in its sister VM deployed in the other physical host.<br>- If one physical host becomes not usable, then all resources are started in the other physical host.<br>- Two STONITH levels are used to fence the problematic nodes. <br><br>The resources have the following behavior:<br>- If the resource monitor detects a problem, then Pacemaker tries to restart the resource in the same node.<br>- If it fails, then STONITH takes place (vcenter reboots the VM) and Pacemaker starts the resource in the sister VM present in the other physical host.<br>- If restarting the VM fails, I want to power off the physical server and Pacemaker will start all resources in the other physical host.<br><br><br>The HA stack is:<br>Ubuntu 14.04 (the node OS, which is a visualized guest running in VMWare ESXi 5.5)<br>Pacemaker 1.1.12<br>Corosync 2.3.4<br>CRM 2.1.2<br><br>The 4 nodes are:<br>cluster-a-1<br>cluster-a-2<br>cluster-b-1<br>cluster-b-2<br><br>The relevant configuration is:<br><br><span style="font-family:monospace,monospace">property symmetric-cluster=false<br>property stonith-enabled=true<br>property no-quorum-policy=stop<br><br>group group-cluster-a vip-cluster-a docker-web<br>location loc-group-cluster-a-1 group-cluster-a inf: cluster-a-1<br>location loc-group-cluster-a-2 group-cluster-a 500: cluster-a-2<br> <br>group group-cluster-b vip-cluster-b docker-srv<br>location loc-group-cluster-b-1 group-cluster-b 500: cluster-b-1<br>location loc-group-cluster-b-2 group-cluster-b inf: cluster-b-2<br><br><br># stonith vcenter definitions for host 1<br># run in any of the host2 VM<br>primitive stonith-vcenter-host1 stonith:external/vcenter \<br> params \<br> VI_SERVER="192.168.40.20" \<br> VI_CREDSTORE="/etc/vicredentials.xml" \<br> HOSTLIST="cluster-a-1=cluster-a-1;cluster-a-2=cluster-a-2" \<br> RESETPOWERON="1" \<br> priority="2" \<br> pcmk_host_check="static-list" \<br> pcmk_host_list="cluster-a-1 cluster-a-2" \<br> op monitor interval="60s"<br><br>location loc1-stonith-vcenter-host1 stonith-vcenter-host1 500: cluster-b-1<br>location loc2-stonith-vcenter-host1 stonith-vcenter-host1 501: cluster-b-2<br><br># stonith vcenter definitions for host 2<br># run in any of the host1 VM<br>primitive stonith-vcenter-host2 stonith:external/vcenter \<br> params \<br> VI_SERVER="192.168.40.21" \<br> VI_CREDSTORE="/etc/vicredentials.xml" \<br> HOSTLIST="cluster-b-1=cluster-b-1;cluster-b-2=cluster-b-2" \<br> RESETPOWERON="1" \<br> priority="2" \<br> pcmk_host_check="static-list" \<br> pcmk_host_list="cluster-b-1 cluster-b-2" \<br> op monitor interval="60s"<br><br>location loc1-stonith-vcenter-host2 stonith-vcenter-host2 500: cluster-a-1<br>location loc2-stonith-vcenter-host2 stonith-vcenter-host2 501: cluster-a-2<br><br><br># stonith IPMI definitions for host 1 (DELL with iDRAC 7 enterprise interface at 192.168.40.15)<br># run in any of the host2 VM<br>primitive stonith-ipmi-host1 stonith:external/ipmi \<br> params hostname="host1" ipaddr="192.168.40.15" userid="root" passwd="mypassword" interface="lanplus" \<br> priority="1" \<br> pcmk_host_check="static-list" \<br> pcmk_host_list="cluster-a-1 cluster-a-2" \<br> op start interval="0" timeout="60s" requires="nothing" \<br> op monitor interval="3600s" timeout="20s" requires="nothing"<br><br>location loc1-stonith-ipmi-host1 stonith-ipmi-host1 500: cluster-b-1<br>location loc2-stonith-ipmi-host1 stonith-ipmi-host1 501: cluster-b-2<br><br><br># stonith IPMI definitions for host 2 (DELL with iDRAC 7 enterprise interface at 192.168.40.16)<br># run in any of the host1 VM<br>primitive stonith-ipmi-host2 stonith:external/ipmi \<br> params hostname="host2" ipaddr="192.168.40.16" userid="root" passwd="mypassword" interface="lanplus" \<br> priority="1" \<br> pcmk_host_check="static-list" \<br> pcmk_host_list="cluster-b-1 cluster-b-2" \<br> op start interval="0" timeout="60s" requires="nothing" \<br> op monitor interval="3600s" timeout="20s" requires="nothing"<br><br>location loc1-stonith-ipmi-host2 stonith-ipmi-host2 500: cluster-a-1<br>location loc2-stonith-ipmi-host2 stonith-ipmi-host2 501: cluster-a-2</span><br><br><br>What is working:<br>- When an error is detected in one resource, the resource restart in the same node, as expected.<br>- With the STONITH external/ipmi resource *stopped*, a fail in one node makes the vcenter rebooting it and the resources starts in the sister node.<br><br><br>What is not so good:<br>- When vcenter reboots one node, then the resource starts in the other node as expected but then they return to the original node as soon as it becomes online. This makes a bit of ping-pong and I think it is a consequence of how the locations are defined. Any suggestion to avoid this? After the resource was moved to another node, I would prefer that it stays there, instead of returning it to the original node. I can think of playing with the resource affinity scores - is this way it should be done?<br><br>What is wrong:<br>Lets consider this scenario. <br>I have a set of resources provided by a docker agent. My test consists in stopping the docker service in the node cluster-a-1, which makes the docker agent to return OCF_ERR_INSTALLED to Pacemaker (this is a change I made in the docker agent, when compared to the github repository version). With the IPMI STONITH resource stopped, this leads to the node cluster-a-1 restart, which is expected.<br><br>But with the IPMI STONITH resource started, I notice an erratic behavior:<br>- Some times, the resources at the node cluster-a-1 are stopped and no STONITH happens. Also, the resources are not moved to the node cluster-a-2. In this situation, if I manually restart the node cluster-a-1 (virtual machine restart), then the IPMI STONITH takes place and restarts the corresponding physical server.<br>- Sometimes, the IPMI STONITH starts before the vCenter STONITH, which is not expected because the vCenter STONITH has higher priority.<br><br>I might have something wrong in my stonith definition, but I can't figure what.<br>Any idea how to correct this?<br><br>And how can I set external/ipmi to power off the physical host, instead of rebooting it?<br><br></div></div></div></div>
</blockquote></div><br></div>