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

John McCabe john at johnmccabe.net
Fri May 10 03:18:36 CEST 2013


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 &lt;action&gt;" />
                <content type="string" default="off" />
                <shortdesc lang="en">Fencing Action</shortdesc>
        </parameter>
        <parameter name="path" unique="0" required="1">
                <getopt mixed="-p &lt;action&gt;" />
                <content type="string" />
                <shortdesc lang="en">Path to sanlock shared
storage</shortdesc>
        </parameter>
        <parameter name="host_id" unique="0" required="1">
                <getopt mixed="-i &lt;action&gt;" />
                <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: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20130510/9c60c662/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: messages.sanlock.gz
Type: application/x-gzip
Size: 1138 bytes
Desc: not available
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20130510/9c60c662/attachment.gz>


More information about the Pacemaker mailing list