<div dir="ltr"><div><div><div>Hi All,<br><br></div>the following logs from corosync.log that might help.<br><br>Apr 25 10:29:32 [15334] gmlcdbw02    pengine:     info: native_print:    ipmi-fence-db01    (stonith:fence_ipmilan):    Started gmlcdbw01<br>Apr 25 10:29:32 [15334] gmlcdbw02    pengine:     info: native_print:    ipmi-fence-db02    (stonith:fence_ipmilan):    Started gmlcdbw02<br><br>Apr 25 10:29:32 [15334] gmlcdbw02    pengine:     info: RecurringOp:     Start recurring monitor (60s) for ipmi-fence-db01 on gmlcdbw02<br>Apr 25 10:29:32 [15334] gmlcdbw02    pengine:   notice: LogActions:    Move    ipmi-fence-db01    (Started gmlcdbw01 -> gmlcdbw02)<br>Apr 25 10:29:32 [15334] gmlcdbw02    pengine:     info: LogActions:    Leave   ipmi-fence-db02    (Started gmlcdbw02)<br>Apr 25 10:29:32 [15335] gmlcdbw02       crmd:   notice: te_rsc_command:    Initiating action 11: stop ipmi-fence-db01_stop_0 on gmlcdbw01<br>Apr 25 10:29:32 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='1']/lrm[@id='1']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_last_0']:  @operation_key=ipmi-fence-db01_stop_0, @operation=stop, @transition-key=11:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;11:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=75, @last-run=1493087372, @last-rc-change=1493087372, @exec-time=0<br>Apr 25 10:29:32 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='1']/lrm[@id='1']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_last_0']:  @operation_key=ipmi-fence-db01_stop_0, @operation=stop, @transition-key=11:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;11:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=75, @last-run=1493087372, @last-rc-change=1493087372, @exec-time=0<br>Apr 25 10:29:32 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='1']/lrm[@id='1']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_last_0']:  @operation_key=ipmi-fence-db01_stop_0, @operation=stop, @transition-key=11:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;11:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=75, @last-run=1493087372, @last-rc-change=1493087372, @exec-time=0<br>Apr 25 10:29:32 [15335] gmlcdbw02       crmd:     info: match_graph_event:    Action ipmi-fence-db01_stop_0 (11) confirmed on gmlcdbw01 (rc=0)<br>Apr 25 10:29:32 [15335] gmlcdbw02       crmd:   notice: te_rsc_command:    Initiating action 12: start ipmi-fence-db01_start_0 on gmlcdbw02 (local)<br>Apr 25 10:29:32 [15335] gmlcdbw02       crmd:     info: do_lrm_rsc_op:    Performing key=12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850 op=ipmi-fence-db01_start_0<br>Apr 25 10:29:32 [15332] gmlcdbw02       lrmd:     info: log_execute:    executing - rsc:ipmi-fence-db01 action:start call_id:65<br>Apr 25 10:29:32 [15332] gmlcdbw02       lrmd:     info: log_finished:    finished - rsc:ipmi-fence-db01 action:start call_id:65  exit-code:0 exec-time:45ms queue-time:0ms<br>Apr 25 10:29:33 [15335] gmlcdbw02       crmd:   notice: process_lrm_event:    Operation ipmi-fence-db01_start_0: ok (node=gmlcdbw02, call=65, rc=0, cib-update=2571, confirmed=true)<br>Apr 25 10:29:33 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='2']/lrm[@id='2']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_last_0']:  @operation_key=ipmi-fence-db01_start_0, @operation=start, @transition-key=12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=65, @last-run=1493087372, @last-rc-change=1493087372, @exec-time=45<br>Apr 25 10:29:33 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='2']/lrm[@id='2']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_last_0']:  @operation_key=ipmi-fence-db01_start_0, @operation=start, @transition-key=12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=65, @last-run=1493087372, @last-rc-change=1493087372, @exec-time=45<br>Apr 25 10:29:33 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='2']/lrm[@id='2']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_last_0']:  @operation_key=ipmi-fence-db01_start_0, @operation=start, @transition-key=12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;12:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=65, @last-run=1493087372, @last-rc-change=1493087372, @exec-time=45<br>Apr 25 10:29:33 [15335] gmlcdbw02       crmd:     info: match_graph_event:    Action ipmi-fence-db01_start_0 (12) confirmed on gmlcdbw02 (rc=0)<br>Apr 25 10:29:33 [15335] gmlcdbw02       crmd:   notice: te_rsc_command:    Initiating action 13: monitor ipmi-fence-db01_monitor_60000 on gmlcdbw02 (local)<br>Apr 25 10:29:33 [15335] gmlcdbw02       crmd:     info: do_lrm_rsc_op:    Performing key=13:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850 op=ipmi-fence-db01_monitor_60000<br>Apr 25 10:29:33 [15335] gmlcdbw02       crmd:     info: process_lrm_event:    Operation ipmi-fence-db01_monitor_60000: ok (node=gmlcdbw02, call=66, rc=0, cib-update=2577, confirmed=false)<br>Apr 25 10:29:33 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='2']/lrm[@id='2']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_monitor_60000']:  @transition-key=13:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;13:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=66, @last-rc-change=1493087373, @exec-time=39<br>Apr 25 10:29:33 [15330] gmlcdbw02        cib:     info: cib_perform_op:    +  /cib/status/node_state[@id='2']/lrm[@id='2']/lrm_resources/lrm_resource[@id='ipmi-fence-db01']/lrm_rsc_op[@id='ipmi-fence-db01_monitor_60000']:  @transition-key=13:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @transition-magic=0:0;13:2485:0:27a91aab-060a-4de9-80b1-18abeb7bd850, @call-id=66, @last-rc-change=1493087373, @exec-time=39<br>Apr 25 10:29:33 [15335] gmlcdbw02       crmd:     info: match_graph_event:    Action ipmi-fence-db01_monitor_60000 (13) confirmed on gmlcdbw02 (rc=0)<br>Apr 25 10:35:37 [15333] gmlcdbw02      attrd:     info: write_attribute:    Sent update 6 with 1 changes for fail-count-ipmi-fence-db02, id=<n/a>, set=(null)<br>Apr 25 10:35:37 [15333] gmlcdbw02      attrd:     info: attrd_cib_callback:    Update 6 for fail-count-ipmi-fence-db02: OK (0)<br>Apr 25 10:35:37 [15333] gmlcdbw02      attrd:     info: attrd_cib_callback:    Update 6 for fail-count-ipmi-fence-db02[gmlcdbw02]=(null): OK (0)<br><br>Apr 25 10:35:37 [15334] gmlcdbw02    pengine:     info: native_print:    ipmi-fence-db01    (stonith:fence_ipmilan):    Started gmlcdbw02<br>Apr 25 10:35:37 [15334] gmlcdbw02    pengine:     info: native_print:    ipmi-fence-db02    (stonith:fence_ipmilan):    Started gmlcdbw02<br><br>Apr 25 10:35:37 [15334] gmlcdbw02    pengine:     info: native_color:    Resource ipmi-fence-db01 cannot run anywhere<br>Apr 25 10:35:37 [15334] gmlcdbw02    pengine:     info: native_color:    Resource ipmi-fence-db02 cannot run anywhere<br>Apr 25 10:35:37 [15334] gmlcdbw02    pengine:   notice: LogActions:    Stop    ipmi-fence-db01    (gmlcdbw02)<br>Apr 25 10:35:37 [15334] gmlcdbw02    pengine:   notice: LogActions:    Stop    ipmi-fence-db02    (gmlcdbw02)<br>Apr 25 10:35:37 [15335] gmlcdbw02       crmd:   notice: te_rsc_command:    Initiating action 10: stop ipmi-fence-db01_stop_0 on gmlcdbw02 (local)<br><br></div>if i create location constraint, can i force ipmi-fence-db01 keep on the gmlcdbw01?<br># pcs constraint location ipmi-fence-db01 prefers gmlcdbw01<br># pcs constraint location ipmi-fence-db02 prefers gmlcdbw02<br><br></div>Thanks.<br><br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 9:39 AM, Albert Weng <span dir="ltr"><<a href="mailto:weng.albert@gmail.com" target="_blank">weng.albert@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><div><div><div><div><div><div>Hi All,<br><br></div>I have created active/passive pacemaker cluster on RHEL 7.<br><br></div>here is my environment: <br></div>clustera : 192.168.11.1<br></div>clusterb : 192.168.11.2<br></div>clustera-ilo4 : 192.168.11.10<br></div>clusterb-ilo4 : 192.168.11.11<br><br></div><div>both nodes are connected SAN storage for shared storage.<br><br></div><div><div>i used the following cmd to create my stonith devices on each node :<br><span style="font-weight:bold"># pcs -f stonith_cfg
stonith create ipmi-fence-node1 fence_ipmilan parms lanplus="ture"
pcmk_host_list="clustera" pcmk_host_check="static-list"
action="reboot" ipaddr="192.168.11.10" login=adminsitrator
passwd=1234322 op monitor interval=60s</span></div><div>

<div><div><div><div><div><div><div><div><div><div><div><div><div><span style="font-weight:bold"><br># pcs -f stonith_cfg
stonith create ipmi-fence-node02 fence_ipmilan parms lanplus="true"
pcmk_host_list="clusterb" pcmk_host_check="static-list"
action="reboot" ipaddr="192.168.11.11" login=USERID
passwd=password op monitor interval=60s</span>

<br><br></div><div># pcs status<br></div><div>ipmi-fence-node1              <wbr>       clustera<br></div><div>ipmi-fence-node2              <wbr>       clusterb<br><br></div><div>but when i failover to passive node, then i ran <br></div><div># pcs status<br><br></div><div>ipmi-fence-node1              <wbr>      clusterb<br></div><div>ipmi-fence-node2              <wbr>      clusterb<br><br></div><div>why both fence device locate on the same node ? <br></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br>-- <br><div class="m_-4327774609408162231gmail_signature">Kind regards,<br>Albert Weng</div>
</div></font></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><span class="HOEnZb"><font color="#888888"><div id="m_-4327774609408162231DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tbody><tr>
      <td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" style="width:46px;height:29px" height="29" width="46"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">不含病毒。<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#4453ea" target="_blank">www.avast.com</a>                </td>
        </tr>
</tbody></table>
<a href="#m_-4327774609408162231_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Kind regards,<br>Albert Weng</div>
</div>