<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym18_1_1458581470659_17793">Hi guys, <br></div><div id="yui_3_16_0_ym18_1_1458581470659_17637"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_17646" dir="ltr">Im trying to create a new cluster using pacemaker but Im having a problem with the fence mechanism.</div><div id="yui_3_16_0_ym18_1_1458581470659_17644" dir="ltr">Until de moment I have perform the following tasks:</div><div id="yui_3_16_0_ym18_1_1458581470659_17639" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_17641" dir="ltr">+ I have installed two different machines with centos 7 (infrastructure mode).</div><div id="yui_3_16_0_ym18_1_1458581470659_17888" dir="ltr">+ Each machine have been configured with two network cards (one for management and a second one for service)<br></div><div id="yui_3_16_0_ym18_1_1458581470659_17889" dir="ltr">+ Corosync pacemaker pcs dlm dlm-lib fence-agents-all lvm2-cluster have been installed <br></div><div id="yui_3_16_0_ym18_1_1458581470659_17852" dir="ltr">+ The corosync.conf file is configured.</div><div id="yui_3_16_0_ym18_1_1458581470659_19391" dir="ltr">+ The cluster have been initialized using pcs cluster start --all <br></div><div id="yui_3_16_0_ym18_1_1458581470659_18095" dir="ltr">+ At executing the pcs status command, I get the following output</div><div id="yui_3_16_0_ym18_1_1458581470659_18093" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18117" dir="ltr"><font id="yui_3_16_0_ym18_1_1458581470659_18314" color="#4c76a2" size="2">Cluster name: mycluster-ha<br>WARNING: no stonith devices and stonith-enabled is not false<br>Last updated: Sat Mar 19 10:01:43 2016          Last change: Fri Mar 18 03:36:23 2016 by root via cibadmin on node-01<br>Stack: corosync<br>Current DC: node-01 (version 1.1.13-10.el7_2.2-44eb2dd) - partition with quorum<br>2 nodes and 0 resources configured<br><br>Online: [ node-01 node-02 ]<br><br>Full list of resources:<br><br>PCSD Status:<br>  node-01: Online<br>  node-02: Online<br><br>Daemon Status:<br>  corosync: active/disabled<br>  pacemaker: active/disabled<br>  pcsd: active/enabled</font><br><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18091" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18044" dir="ltr">The problem what Im having is that I don't have a physical PDU, so I have to simulate one.</div><div id="yui_3_16_0_ym18_1_1458581470659_18391" dir="ltr">For this purpose I have created a fence script in python  and it has been added to the /usr/sbin folder (with its respective permissions), where are located the all fence scripts.</div><div id="yui_3_16_0_ym18_1_1458581470659_18767" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18531" dir="ltr">Now, when a execute the command pcs stonith list I get the output</div><div id="yui_3_16_0_ym18_1_1458581470659_18682" dir="ltr"><span id="yui_3_16_0_ym18_1_1458581470659_18681" style="color:rgb(255,0,0)">Error: no metadata for /usr/sbin/fence_manual</span></div><div id="yui_3_16_0_ym18_1_1458581470659_18679" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18639" dir="ltr">Any way, to add the fence mechanism I executed the command <br></div><div id="yui_3_16_0_ym18_1_1458581470659_18687" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18688" dir="ltr"><font id="yui_3_16_0_ym18_1_1458581470659_18704" color="#4c76a2">#pcs cluster cib stonith_cfg<br>#pcs -f stonith_cfg stonith create fence_node_01 fence_manual ipadd="node-01" action="off" passwd="passwd" login="admin" pcmk_host_list="node-01" op monitor interval=60s</font><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18638" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18777" dir="ltr">but after this I get the output</div><div id="yui_3_16_0_ym18_1_1458581470659_18811" dir="ltr"><span id="yui_3_16_0_ym18_1_1458581470659_18810" style="color:rgb(255,0,0)">Error: Unable to create resource stonith fence_manual, it is not installed on this system (use --force to override)</span></div><div id="yui_3_16_0_ym18_1_1458581470659_18045" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18814" dir="ltr">By using the --option, the resource is added, but its status is always stopped.</div><div id="yui_3_16_0_ym18_1_1458581470659_18932" dir="ltr"> <br></div><div id="yui_3_16_0_ym18_1_1458581470659_18933" dir="ltr">By executing again the command pcs status give me the following output</div><div id="yui_3_16_0_ym18_1_1458581470659_18995" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_18934" dir="ltr"><span id="yui_3_16_0_ym18_1_1458581470659_18936" style="color:rgb(0,0,255)"><b>Cluster name:</b> mycluster-ha<br><b id="yui_3_16_0_ym18_1_1458581470659_19549">Last updated</b>: Thu Mar 17 06:38:52 2016          Last change: Thu Mar 17 06:26:17 2016 by root via cibadmin on node-01<br><b>Stack:</b> corosync<br><b id="yui_3_16_0_ym18_1_1458581470659_19550">Current DC:</b> node-01 (version 1.1.13-10.el7_2.2-44eb2dd) - partition with quorum<br>2 nodes and 1 resource configured<br><br>Online:<span style="color:rgb(56,118,29)"> [ node-01 node-02 ]</span><br><br><b id="yui_3_16_0_ym18_1_1458581470659_19551">Full list of resources:</b><br><br> fence_node-01  (stonith:fence_manual): <b id="yui_3_16_0_ym18_1_1458581470659_19012"><span id="yui_3_16_0_ym18_1_1458581470659_19011" style="color:rgb(255,0,0)">Stopped</span></b><br><br><b id="yui_3_16_0_ym18_1_1458581470659_19552">Failed Actions:</b><br><span id="yui_3_16_0_ym18_1_1458581470659_18935" style="color:rgb(255,0,0)">* fence_node-01_start_0 on node-02 'unknown error' (1): call=6, status=Error, exitreason='none',<br>    last-rc-change='Thu Mar 17 23:11:30 2016', queued=0ms, exec=2008ms<br>* fence_node-01_start_0 on node-01 'unknown error' (1): call=6, status=Error, exitreason='none',<br>    last-rc-change='Thu Mar 17 06:30:01 2016', queued=0ms, exec=2007ms</span><br><br><b><br>PCSD Status:</b><br>  node-01: <span style="color:rgb(56,118,29)">Online</span><br>  node-02: <span style="color:rgb(56,118,29)">Online</span><br><br><b id="yui_3_16_0_ym18_1_1458581470659_19553">Daemon Status:</b><br>  <b>corosync:</b> <span style="color:rgb(56,118,29)">active/disabled</span><br>  <b id="yui_3_16_0_ym18_1_1458581470659_19554">pacemaker:</b> <span id="yui_3_16_0_ym18_1_1458581470659_19568" style="color:rgb(56,118,29)">active/disabled</span><br>  <b>pcsd:</b> <span style="color:rgb(56,118,29)">active/enabled</span></span></div><div id="yui_3_16_0_ym18_1_1458581470659_19056" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19058" dir="ltr">So to remove this error and go back to the previous status I executed the command <br></div><div id="yui_3_16_0_ym18_1_1458581470659_19067" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19069" dir="ltr"><font id="yui_3_16_0_ym18_1_1458581470659_19680" color="#4c76a2">pcs resource cleanup fence_node_01</font></div><div id="yui_3_16_0_ym18_1_1458581470659_19071" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19073" dir="ltr">but now, when I execute the command <br></div><div id="yui_3_16_0_ym18_1_1458581470659_19157" dir="ltr"><font color="#4c76a2">pcs stonith list</font></div><div id="yui_3_16_0_ym18_1_1458581470659_19180" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19179" dir="ltr">Im getting the error <font id="yui_3_16_0_ym18_1_1458581470659_19197" color="#cd232c"><br></font></div><div id="yui_3_16_0_ym18_1_1458581470659_19208" dir="ltr"><font id="yui_3_16_0_ym18_1_1458581470659_19197" color="#cd232c">Error: unable to locate command: /usr/sbin/fence_manual</font><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19183" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19186" dir="ltr">Can someone guide me with this process?</div><div id="yui_3_16_0_ym18_1_1458581470659_19269" dir="ltr">I donĀ“t know why im getting this error configuring the fence mechanism.</div><div id="yui_3_16_0_ym18_1_1458581470659_19595" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19597" dir="ltr">How can I add a new fence mechanism to the system, and it to be detected by the pcs?<br></div><div id="yui_3_16_0_ym18_1_1458581470659_19075" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19077" dir="ltr">Thanks in advance<br></div><div id="yui_3_16_0_ym18_1_1458581470659_19206" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19632" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19634" dir="ltr">PD: SELinux is disabled (temporally) to avoid any problem in communications with the nodes.<br></div><div id="yui_3_16_0_ym18_1_1458581470659_19647" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458581470659_19664" dir="ltr"><br></div></div></body></html>