[Pacemaker] Using fence_sanlock with pacemaker 1.1.8-7.el6

John McCabe john at johnmccabe.net
Thu May 9 21:21:29 EDT 2013


Forgot to include my cman config...

<?xml version="1.0"?>
<cluster config_version="1" name="ngwcluster">
  <logging debug="off"/>
  <clusternodes>
    <clusternode name="fee-1" nodeid="1">
      <fence>
        <method name="pcmk-redirect">
          <device name="pcmk" port="fee-1"/>
        </method>
      </fence>
    </clusternode>
    <clusternode name="fi-1" nodeid="2">
      <fence>
        <method name="pcmk-redirect">
          <device name="pcmk" port="fi-1"/>
        </method>
      </fence>
    </clusternode>
  </clusternodes>
  <fencedevices>
    <fencedevice name="pcmk" agent="fence_pcmk"/>
  </fencedevices>
  <cman two_node="1" expected_votes="1">
  </cman>
</cluster>


On Fri, May 10, 2013 at 2:18 AM, John McCabe <john at johnmccabe.net> wrote:

>
>
>
> On Thu, May 9, 2013 at 3:12 AM, Andrew Beekhof <andrew at beekhof.net> wrote:
>
>>
>> On 08/05/2013, at 11:52 PM, John McCabe <john at johnmccabe.net> wrote:
>>
>> > Hi,
>> > I've been trying, unsuccessfully, to get fence_sanlock running as a
>> fence device within pacemaker 1.1.8 in Centos64.
>> >
>> > I've set the pcmk_host_argument="host_id"
>>
>> You mean the literal string "host_id" or the true value?
>> Might be better to send us the actual config you're using along with log
>> files.
>>
>> Also, what does "fence_sanlock -o metadata" say?
>
>
> [root at fee ~]# fence_sanlock -o metadata
> <?xml version="1.0" ?>
> <resource-agent name="fence_sanlock" shortdesc="Fence agent for watchdog
> and shared storage">
> <longdesc>
> fence_sanlock is an i/o fencing agent that uses the watchdog device to
> reset nodes.  Shared storage (block or file) is used by sanlock to ensure
> that fenced nodes are reset, and to notify partitioned nodes that they
> need to be reset.
> </longdesc>
> <vendor-url>http://www.redhat.com/</vendor-url>
> <parameters>
>         <parameter name="action" unique="0" required="1">
>                 <getopt mixed="-o <action>" />
>                 <content type="string" default="off" />
>                 <shortdesc lang="en">Fencing Action</shortdesc>
>         </parameter>
>         <parameter name="path" unique="0" required="1">
>                 <getopt mixed="-p <action>" />
>                 <content type="string" />
>                 <shortdesc lang="en">Path to sanlock shared
> storage</shortdesc>
>          </parameter>
>         <parameter name="host_id" unique="0" required="1">
>                 <getopt mixed="-i <action>" />
>                 <content type="string" />
>                 <shortdesc lang="en">Host id for sanlock
> (1-128)</shortdesc>
>         </parameter>
> </parameters>
> <actions>
>         <action name="on" />
>         <action name="off" />
>         <action name="status" />
>         <action name="metadata" />
>         <action name="sanlock_init" />
> </actions>
> </resource-agent>
>
>
> 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):
>
>
>   May 10 01:33:42 fee stonith-ng[10542]:  warning: log_operation:
> st-sanlock:10725 [ host_id argument required ]
>
>   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"
>
>
> 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.
>
> 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?
>
> > along with pcmk_host_map, pcmk_host_list and path.
>> >
>> > 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.
>> >
>> > Is fence_sanlock actually compatible with pacemaker, and has anyone had
>> success using it with pacemaker rather than just directly within CMAN?
>> >
>> > Yours confused,
>> > John
>> > _______________________________________________
>> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>> >
>> > Project Home: http://www.clusterlabs.org
>> > Getting started:
>> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> > Bugs: http://bugs.clusterlabs.org
>>
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130510/9ce5734d/attachment-0003.html>


More information about the Pacemaker mailing list