<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 9, 2013 at 3:12 AM, Andrew Beekhof <span dir="ltr">&lt;<a href="mailto:andrew@beekhof.net" target="_blank">andrew@beekhof.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
On 08/05/2013, at 11:52 PM, John McCabe &lt;<a href="mailto:john@johnmccabe.net">john@johnmccabe.net</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt; I&#39;ve been trying, unsuccessfully, to get fence_sanlock running as a fence device within pacemaker 1.1.8 in Centos64.<br>
&gt;<br>
&gt; I&#39;ve set the pcmk_host_argument=&quot;host_id&quot;<br>
<br>
</div>You mean the literal string &quot;host_id&quot; or the true value?<br>
Might be better to send us the actual config you&#39;re using along with log files.<br>
<br>
Also, what does &quot;fence_sanlock -o metadata&quot; say? </blockquote><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">[root@fee ~]# fence_sanlock -o metadata</div><div class="gmail_quote">

&lt;?xml version=&quot;1.0&quot; ?&gt;</div><div class="gmail_quote">&lt;resource-agent name=&quot;fence_sanlock&quot; shortdesc=&quot;Fence agent for watchdog and shared storage&quot;&gt;</div><div class="gmail_quote">&lt;longdesc&gt;</div>

<div class="gmail_quote">fence_sanlock is an i/o fencing agent that uses the watchdog device to</div><div class="gmail_quote">reset nodes.  Shared storage (block or file) is used by sanlock to ensure</div><div class="gmail_quote">

that fenced nodes are reset, and to notify partitioned nodes that they</div><div class="gmail_quote">need to be reset.</div><div class="gmail_quote">&lt;/longdesc&gt;</div><div class="gmail_quote">&lt;vendor-url&gt;<a href="http://www.redhat.com/">http://www.redhat.com/</a>&lt;/vendor-url&gt;</div>

<div class="gmail_quote">&lt;parameters&gt;</div><div class="gmail_quote">        &lt;parameter name=&quot;action&quot; unique=&quot;0&quot; required=&quot;1&quot;&gt;</div><div class="gmail_quote">                &lt;getopt mixed=&quot;-o &amp;lt;action&amp;gt;&quot; /&gt;</div>

<div class="gmail_quote">                &lt;content type=&quot;string&quot; default=&quot;off&quot; /&gt;</div><div class="gmail_quote">                &lt;shortdesc lang=&quot;en&quot;&gt;Fencing Action&lt;/shortdesc&gt;</div>

<div class="gmail_quote">        &lt;/parameter&gt;</div><div class="gmail_quote">        &lt;parameter name=&quot;path&quot; unique=&quot;0&quot; required=&quot;1&quot;&gt;</div><div class="gmail_quote">                &lt;getopt mixed=&quot;-p &amp;lt;action&amp;gt;&quot; /&gt;</div>

<div class="gmail_quote">                &lt;content type=&quot;string&quot; /&gt;</div><div class="gmail_quote">                &lt;shortdesc lang=&quot;en&quot;&gt;Path to sanlock shared storage&lt;/shortdesc&gt;</div>
<div class="gmail_quote">
        &lt;/parameter&gt;</div><div class="gmail_quote">        &lt;parameter name=&quot;host_id&quot; unique=&quot;0&quot; required=&quot;1&quot;&gt;</div><div class="gmail_quote">                &lt;getopt mixed=&quot;-i &amp;lt;action&amp;gt;&quot; /&gt;</div>

<div class="gmail_quote">                &lt;content type=&quot;string&quot; /&gt;</div><div class="gmail_quote">                &lt;shortdesc lang=&quot;en&quot;&gt;Host id for sanlock (1-128)&lt;/shortdesc&gt;</div><div class="gmail_quote">

        &lt;/parameter&gt;</div><div class="gmail_quote">&lt;/parameters&gt;</div><div class="gmail_quote">&lt;actions&gt;</div><div class="gmail_quote">        &lt;action name=&quot;on&quot; /&gt;</div><div class="gmail_quote">

        &lt;action name=&quot;off&quot; /&gt;</div><div class="gmail_quote">        &lt;action name=&quot;status&quot; /&gt;</div><div class="gmail_quote">        &lt;action name=&quot;metadata&quot; /&gt;</div><div class="gmail_quote">

        &lt;action name=&quot;sanlock_init&quot; /&gt;</div><div class="gmail_quote">&lt;/actions&gt;</div><div class="gmail_quote">&lt;/resource-agent&gt;</div><div class="gmail_quote"> </div><div class="gmail_quote"><br>

</div><div class="gmail_quote">I&#39;d set the pcmk_host_argument to the literal string since the errors thrown complain that the host_id param is missing and I&#39;d assumed that the with the pcmk_host_map also set we&#39;d end up passing the mapped id rather than the hostname (attached an archive with /var/log/messages covering when the stonith device is added with pcs):</div>

<div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">  May 10 01:33:42 fee stonith-ng[10542]:  warning: log_operation: st-sanlock:10725 [ host_id argument required ]</div><div class="gmail_quote">

<br></div><div class="gmail_quote">  pcs -f stonith_cfg_sanlock stonith create st-sanlock fence_sanlock path=&quot;/dev/mapper/vg_shared-lv_sanlock&quot; pcmk_host_list=&quot;fee-1 fi-1&quot; pcmk_host_map=&quot;fee-1:1;fi-1:2&quot; pcmk_host_argument=&quot;host_id&quot;</div>

<div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Taking a closer look at the fence_sanlock script itself (from fence-sanlock-2.6-2.el6.x86_64) and it doesn&#39;t appear to support a monitor operation, which led me to suspect that it didn&#39;t actually support being used with pacemaker, at least without possibly having to update the agent script. Setting pcmk_monitor_action=&quot;status&quot; didn&#39;t help either as it still fails requesting the host_id be set.</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">I ended up getting sbd up and running as an interim solution - but I&#39;d really like to be able to stick with a fencing agent thats got a future in RHEL where possible. Is the expectation/intention that all fencing agents be compatible with pacemaker?</div>

</div><div class="gmail_quote"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
&gt; along with pcmk_host_map, pcmk_host_list and path.<br>

&gt;<br>
&gt; But it later complains that its unable to process the monitor operation since no host_id is provided.. I&#39;d have assumed that the pcmk_host_argument would have performed a mapping, but it seems not to in the case of the monitor operation. When pcs stonith list returned fence_sanlock in its list of agents I&#39;d hoped it was going to be straightforward.<br>


&gt;<br>
&gt; Is fence_sanlock actually compatible with pacemaker, and has anyone had success using it with pacemaker rather than just directly within CMAN?<br>
&gt;<br>
&gt; Yours confused,<br>
&gt; John<br>
</div>&gt; _______________________________________________<br>
&gt; Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
&gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div><br></div></div>