<div dir="ltr">Forgot to include my cman config...<div><br></div><div><div><?xml version="1.0"?></div><div><cluster config_version="1" name="ngwcluster"></div><div> <logging debug="off"/></div>
<div> <clusternodes></div><div> <clusternode name="fee-1" nodeid="1"></div><div> <fence></div><div> <method name="pcmk-redirect"></div><div> <device name="pcmk" port="fee-1"/></div>
<div> </method></div><div> </fence></div><div> </clusternode></div><div> <clusternode name="fi-1" nodeid="2"></div><div> <fence></div><div> <method name="pcmk-redirect"></div>
<div> <device name="pcmk" port="fi-1"/></div><div> </method></div><div> </fence></div><div> </clusternode></div><div> </clusternodes></div><div> <fencedevices></div>
<div> <fencedevice name="pcmk" agent="fence_pcmk"/></div><div> </fencedevices></div><div> <cman two_node="1" expected_votes="1"></div><div> </cman></div>
<div></cluster></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 10, 2013 at 2:18 AM, John McCabe <span dir="ltr"><<a href="mailto:john@johnmccabe.net" target="_blank">john@johnmccabe.net</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"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Thu, May 9, 2013 at 3:12 AM, Andrew Beekhof <span dir="ltr"><<a href="mailto:andrew@beekhof.net" target="_blank">andrew@beekhof.net</a>></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><br>
On 08/05/2013, at 11:52 PM, John McCabe <<a href="mailto:john@johnmccabe.net" target="_blank">john@johnmccabe.net</a>> wrote:<br>
<br>
> Hi,<br>
> I've been trying, unsuccessfully, to get fence_sanlock running as a fence device within pacemaker 1.1.8 in Centos64.<br>
><br>
> I've set the pcmk_host_argument="host_id"<br>
<br>
</div>You mean the literal string "host_id" or the true value?<br>
Might be better to send us the actual config you're using along with log files.<br>
<br>
Also, what does "fence_sanlock -o metadata" say? </blockquote><div class="gmail_quote"><br></div></div><div class="gmail_quote"><div class="gmail_quote">[root@fee ~]# fence_sanlock -o metadata</div><div class="gmail_quote">
<?xml version="1.0" ?></div><div class="gmail_quote"><resource-agent name="fence_sanlock" shortdesc="Fence agent for watchdog and shared storage"></div><div class="gmail_quote"><longdesc></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"></longdesc></div><div class="gmail_quote"><vendor-url><a href="http://www.redhat.com/" target="_blank">http://www.redhat.com/</a></vendor-url></div>
<div class="gmail_quote"><parameters></div><div class="gmail_quote"> <parameter name="action" unique="0" required="1"></div><div class="gmail_quote"> <getopt mixed="-o <action>" /></div>
<div class="gmail_quote"> <content type="string" default="off" /></div><div class="gmail_quote"> <shortdesc lang="en">Fencing Action</shortdesc></div>
<div class="gmail_quote"> </parameter></div><div class="gmail_quote"> <parameter name="path" unique="0" required="1"></div><div class="gmail_quote"> <getopt mixed="-p <action>" /></div>
<div class="gmail_quote"> <content type="string" /></div><div class="gmail_quote"> <shortdesc lang="en">Path to sanlock shared storage</shortdesc></div>
<div class="gmail_quote">
</parameter></div><div class="gmail_quote"> <parameter name="host_id" unique="0" required="1"></div><div class="gmail_quote"> <getopt mixed="-i <action>" /></div>
<div class="gmail_quote"> <content type="string" /></div><div class="gmail_quote"> <shortdesc lang="en">Host id for sanlock (1-128)</shortdesc></div><div class="gmail_quote">
</parameter></div><div class="gmail_quote"></parameters></div><div class="gmail_quote"><actions></div><div class="gmail_quote"> <action name="on" /></div><div class="gmail_quote">
<action name="off" /></div><div class="gmail_quote"> <action name="status" /></div><div class="gmail_quote"> <action name="metadata" /></div><div class="gmail_quote">
<action name="sanlock_init" /></div><div class="gmail_quote"></actions></div><div class="gmail_quote"></resource-agent></div><div class="gmail_quote"> </div><div class="gmail_quote"><br>
</div><div class="gmail_quote">I'd set the pcmk_host_argument to the literal string since the errors thrown complain that the host_id param is missing and I'd assumed that the with the pcmk_host_map also set we'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="/dev/mapper/vg_shared-lv_sanlock" pcmk_host_list="fee-1 fi-1" pcmk_host_map="fee-1:1;fi-1:2" pcmk_host_argument="host_id"</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't appear to support a monitor operation, which led me to suspect that it didn't actually support being used with pacemaker, at least without possibly having to update the agent script. Setting pcmk_monitor_action="status" didn'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'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="im"><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>> along with pcmk_host_map, pcmk_host_list and path.<br>
><br>
> But it later complains that its unable to process the monitor operation since no host_id is provided.. I'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'd hoped it was going to be straightforward.<br>
><br>
> Is fence_sanlock actually compatible with pacemaker, and has anyone had success using it with pacemaker rather than just directly within CMAN?<br>
><br>
> Yours confused,<br>
> John<br>
</div>> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">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>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">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></div><br></div></div>
</blockquote></div><br></div>