<div dir="ltr">Thanks Ken,<div><br></div><div>I have figure out root cause. There was race condition while adding resource and creating constrain(location).</div><div><br></div><div>When resource was added to cluster, all nodes trying to &#39;probe&#39; resource via ocf - and because ocf didn&#39;t exist on 2/3 nodes at that time - pacemaker mark them as -INFINITY and even updating constrains(adding locations) - doesn&#39;t automatically reprobe/clean resource. It was hard to debug - because there were no errors/failed action for this resource, when you run cli commands.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 16, 2016 at 1:29 PM, Ken Gaillot <span dir="ltr">&lt;<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@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 08/05/2016 05:12 PM, Nikita Koshikov wrote:<br>
&gt; Thanks, Ken,<br>
&gt;<br>
&gt; On Fri, Aug 5, 2016 at 7:21 AM, Ken Gaillot &lt;<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a><br>
</span><span class="">&gt; &lt;mailto:<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     On 08/05/2016 03:48 AM, Andreas Kurz wrote:<br>
&gt;     &gt; Hi,<br>
&gt;     &gt;<br>
&gt;     &gt; On Fri, Aug 5, 2016 at 2:08 AM, Nikita Koshikov &lt;<a href="mailto:koshikov@gmail.com">koshikov@gmail.com</a> &lt;mailto:<a href="mailto:koshikov@gmail.com">koshikov@gmail.com</a>&gt;<br>
</span><div><div class="h5">&gt;     &gt; &lt;mailto:<a href="mailto:koshikov@gmail.com">koshikov@gmail.com</a> &lt;mailto:<a href="mailto:koshikov@gmail.com">koshikov@gmail.com</a>&gt;&gt;&gt; wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;     Hello list,<br>
&gt;     &gt;<br>
&gt;     &gt;     Can you, please, help me in debugging 1 resource not being started<br>
&gt;     &gt;     after node failover ?<br>
&gt;     &gt;<br>
&gt;     &gt;     Here is configuration that I&#39;m testing:<br>
&gt;     &gt;     3 nodes(kvm VM) cluster, that have:<br>
&gt;     &gt;<br>
&gt;     &gt;     node 10: aic-controller-58055.test.<wbr>domain.local<br>
&gt;     &gt;     node 6: aic-controller-50186.test.<wbr>domain.local<br>
&gt;     &gt;     node 9: aic-controller-12993.test.<wbr>domain.local<br>
&gt;     &gt;     primitive cmha cmha \<br>
&gt;     &gt;             params conffile=&quot;/etc/cmha/cmha.conf&quot;<br>
&gt;     &gt;     daemon=&quot;/usr/bin/cmhad&quot; pidfile=&quot;/var/run/cmha/cmha.<wbr>pid&quot;<br>
&gt;     user=cmha \<br>
&gt;     &gt;             meta failure-timeout=30 resource-stickiness=1<br>
&gt;     &gt;     target-role=Started migration-threshold=3 \<br>
&gt;     &gt;             op monitor interval=10 on-fail=restart timeout=20 \<br>
&gt;     &gt;             op start interval=0 on-fail=restart timeout=60 \<br>
&gt;     &gt;             op stop interval=0 on-fail=block timeout=90<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; What is the output of crm_mon -1frA once a node is down ... any failed<br>
&gt;     &gt; actions?<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     primitive sysinfo_aic-controller-12993.<wbr>test.domain.local<br>
&gt;     &gt;     ocf:pacemaker:SysInfo \<br>
&gt;     &gt;             params disk_unit=M disks=&quot;/ /var/log&quot; min_disk_free=512M \<br>
&gt;     &gt;             op monitor interval=15s<br>
&gt;     &gt;     primitive sysinfo_aic-controller-50186.<wbr>test.domain.local<br>
&gt;     &gt;     ocf:pacemaker:SysInfo \<br>
&gt;     &gt;             params disk_unit=M disks=&quot;/ /var/log&quot; min_disk_free=512M \<br>
&gt;     &gt;             op monitor interval=15s<br>
&gt;     &gt;     primitive sysinfo_aic-controller-58055.<wbr>test.domain.local<br>
&gt;     &gt;     ocf:pacemaker:SysInfo \<br>
&gt;     &gt;             params disk_unit=M disks=&quot;/ /var/log&quot; min_disk_free=512M \<br>
&gt;     &gt;             op monitor interval=15s<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; You can use a clone for this sysinfo resource and a symmetric cluster<br>
&gt;     &gt; for a more compact configuration .... then you can skip all these<br>
&gt;     &gt; location constraints.<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     location cmha-on-aic-controller-12993.<wbr>test.domain.local cmha 100:<br>
&gt;     &gt;     aic-controller-12993.test.<wbr>domain.local<br>
&gt;     &gt;     location cmha-on-aic-controller-50186.<wbr>test.domain.local cmha 100:<br>
&gt;     &gt;     aic-controller-50186.test.<wbr>domain.local<br>
&gt;     &gt;     location cmha-on-aic-controller-58055.<wbr>test.domain.local cmha 100:<br>
&gt;     &gt;     aic-controller-58055.test.<wbr>domain.local<br>
&gt;     &gt;     location sysinfo-on-aic-controller-<wbr>12993.test.domain.local<br>
&gt;     &gt;     sysinfo_aic-controller-12993.<wbr>test.domain.local inf:<br>
&gt;     &gt;     aic-controller-12993.test.<wbr>domain.local<br>
&gt;     &gt;     location sysinfo-on-aic-controller-<wbr>50186.test.domain.local<br>
&gt;     &gt;     sysinfo_aic-controller-50186.<wbr>test.domain.local inf:<br>
&gt;     &gt;     aic-controller-50186.test.<wbr>domain.local<br>
&gt;     &gt;     location sysinfo-on-aic-controller-<wbr>58055.test.domain.local<br>
&gt;     &gt;     sysinfo_aic-controller-58055.<wbr>test.domain.local inf:<br>
&gt;     &gt;     aic-controller-58055.test.<wbr>domain.local<br>
&gt;     &gt;     property cib-bootstrap-options: \<br>
&gt;     &gt;             have-watchdog=false \<br>
&gt;     &gt;             dc-version=1.1.14-70404b0 \<br>
&gt;     &gt;             cluster-infrastructure=<wbr>corosync \<br>
&gt;     &gt;             cluster-recheck-interval=15s \<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; Never tried such a low cluster-recheck-interval ... wouldn&#39;t do<br>
&gt;     that. I<br>
&gt;     &gt; saw setups with low intervals burning a lot of cpu cycles in bigger<br>
&gt;     &gt; cluster setups and side-effects from aborted transitions. If you<br>
&gt;     do this<br>
&gt;     &gt; for &quot;cleanup&quot; the cluster state because you see resource-agent errors<br>
&gt;     &gt; you should better fix the resource agent.<br>
&gt;<br>
&gt;     Strongly agree -- your recheck interval is lower than the various action<br>
&gt;     timeouts. The only reason recheck interval should ever be set less than<br>
&gt;     about 5 minutes is if you have time-based rules that you want to trigger<br>
&gt;     with a finer granularity.<br>
&gt;<br>
&gt;     Your issue does not appear to be coming from recheck interval, otherwise<br>
&gt;     it would go away after the recheck interval passed.<br>
&gt;<br>
&gt;<br>
&gt; As of small cluster-recheck-interval - this was only for testing.<br>
&gt;<br>
&gt;<br>
&gt;     &gt; Regards,<br>
&gt;     &gt; Andreas<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;             no-quorum-policy=stop \<br>
&gt;     &gt;             stonith-enabled=false \<br>
&gt;     &gt;             start-failure-is-fatal=false \<br>
&gt;     &gt;             symmetric-cluster=false \<br>
&gt;     &gt;             node-health-strategy=migrate-<wbr>on-red \<br>
&gt;     &gt;             last-lrm-refresh=1470334410<br>
&gt;     &gt;<br>
&gt;     &gt;     When 3 nodes online, everything seemed OK, this is output of<br>
&gt;     &gt;     scoreshow.sh:<br>
&gt;     &gt;     Resource                                                Score<br>
&gt;     &gt;     Node                                   Stickiness #Fail<br>
&gt;     &gt;      Migration-Threshold<br>
&gt;     &gt;     cmha                                                    -INFINITY<br>
&gt;     &gt;     aic-controller-12993.test.<wbr>domain.local 1          0<br>
&gt;     &gt;     cmha<br>
&gt;     &gt;      101 aic-controller-50186.test.<wbr>domain.local 1          0<br>
&gt;     &gt;     cmha                                                    -INFINITY<br>
&gt;<br>
&gt;     Everything is not OK; cmha has -INFINITY scores on two nodes, meaning it<br>
&gt;     won&#39;t be allowed to run on them. This is why it won&#39;t start after the<br>
&gt;     one allowed node goes down, and why cleanup gets it working again<br>
&gt;     (cleanup removes bans caused by resource failures).<br>
&gt;<br>
&gt;     It&#39;s likely the resource previously failed the maximum allowed times<br>
&gt;     (migration-threshold=3) on those two nodes.<br>
&gt;<br>
&gt;     The next step would be to figure out why the resource is failing. The<br>
&gt;     pacemaker logs will show any output from the resource agent.<br>
&gt;<br>
&gt;<br>
&gt; Resource was never started on these nodes. Maybe problem is in flow ? We<br>
&gt; deploy:<br>
&gt;<br>
&gt; 1) 1 node with all 3 IPs in corosync.conf<br>
&gt; 2) set no-quorum policy = ignore<br>
&gt; 3) add 2 nodes to corosync cluster<br>
&gt; 4) create resource + 1 location constrain<br>
&gt; 5) add 2 additional constrains<br>
&gt; 6) set no-quorum policy = stop<br>
&gt;<br>
&gt; The time between 4-5 is about 1 minute. And it&#39;s clear why 2 nodes were<br>
&gt; -INFINITY in this period. But why when we add 2 more constrains - they<br>
&gt; are not updating scores and cam this be changed ?<br>
<br>
</div></div>The resource may have never started on those nodes, but are you sure a<br>
start wasn&#39;t attempted and failed? If the start failed, the -INFINITY<br>
score would come from the failure, rather than only the cluster being<br>
asymmetric.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     &gt;     aic-controller-58055.test.<wbr>domain.local 1          0<br>
&gt;     &gt;     sysinfo_aic-controller-12993.<wbr>test.domain.local          INFINITY<br>
&gt;     &gt;      aic-controller-12993.test.<wbr>domain.local 0          0<br>
&gt;     &gt;     sysinfo_aic-controller-50186.<wbr>test.domain.local          -INFINITY<br>
&gt;     &gt;     aic-controller-50186.test.<wbr>domain.local 0          0<br>
&gt;     &gt;     sysinfo_aic-controller-58055.<wbr>test.domain.local          INFINITY<br>
&gt;     &gt;      aic-controller-58055.test.<wbr>domain.local 0          0<br>
&gt;     &gt;<br>
&gt;     &gt;     The problem starts when 1 node, goes offline<br>
&gt;     (aic-controller-50186).<br>
&gt;     &gt;     The resource cmha is stocked in stopped state.<br>
&gt;     &gt;     Here is the showscores:<br>
&gt;     &gt;     Resource                                                Score<br>
&gt;     &gt;     Node                                   Stickiness #Fail<br>
&gt;     &gt;      Migration-Threshold<br>
&gt;     &gt;     cmha                                                    -INFINITY<br>
&gt;     &gt;     aic-controller-12993.test.<wbr>domain.local 1          0<br>
&gt;     &gt;     cmha                                                    -INFINITY<br>
&gt;     &gt;     aic-controller-50186.test.<wbr>domain.local 1          0<br>
&gt;     &gt;     cmha                                                    -INFINITY<br>
&gt;     &gt;     aic-controller-58055.test.<wbr>domain.local 1          0<br>
&gt;     &gt;<br>
&gt;     &gt;     Even it has target-role=Started pacemaker skipping this resource.<br>
&gt;     &gt;     And in logs I see:<br>
&gt;     &gt;     pengine:     info: native_print:      cmha<br>
&gt;     (ocf::heartbeat:cmha):<br>
&gt;     &gt;      Stopped<br>
&gt;     &gt;     pengine:     info: native_color:      Resource cmha cannot run<br>
&gt;     anywhere<br>
&gt;     &gt;     pengine:     info: LogActions:        Leave   cmha    (Stopped)<br>
&gt;     &gt;<br>
&gt;     &gt;     To recover cmha resource I need to run either:<br>
&gt;     &gt;     1) crm resource cleanup cmha<br>
&gt;     &gt;     2) crm resource reprobe<br>
&gt;     &gt;<br>
&gt;     &gt;     After any of the above commands, resource began to be picked up be<br>
&gt;     &gt;     pacemaker and I see valid scores:<br>
&gt;     &gt;     Resource                                                Score<br>
&gt;     &gt;     Node                                   Stickiness #Fail<br>
&gt;     &gt;      Migration-Threshold<br>
&gt;     &gt;     cmha                                                    100<br>
&gt;     &gt;     aic-controller-58055.test.<wbr>domain.local 1          0        3<br>
&gt;     &gt;     cmha                                                    101<br>
&gt;     &gt;     aic-controller-12993.test.<wbr>domain.local 1          0        3<br>
&gt;     &gt;     cmha                                                    -INFINITY<br>
&gt;     &gt;     aic-controller-50186.test.<wbr>domain.local 1          0        3<br>
&gt;     &gt;<br>
&gt;     &gt;     So the questions here - why cluster-recheck doesn&#39;t work, and<br>
&gt;     should<br>
&gt;     &gt;     it do reprobing ?<br>
&gt;     &gt;     How to make migration work or what I missed in configuration that<br>
&gt;     &gt;     prevents migration?<br>
&gt;     &gt;<br>
&gt;     &gt;     corosync  2.3.4<br>
&gt;     &gt;     pacemaker 1.1.14<br>
</div></div></blockquote></div><br></div>