[ClusterLabs] Fence agent definition under Centos7.6

Ken Gaillot kgaillot at redhat.com
Fri May 31 20:50:53 EDT 2019

On Fri, 2019-05-31 at 22:32 +0000, Michael Powell wrote:
> Although I am personally a novice wrt cluster operation, several
> years ago my company developed a product that used Pacemaker.  I’ve
> been charged with porting that product to a platform running Centos
> 7.6.  The old product ran Pacemaker 1.1.13 and heartbeat.  For the
> most part, the transition to Pacemaker 1.1.19 and Corosync has gone
> pretty well, but there’s one aspect that I’m struggling with: fence-
> agents.
> The old product used a fence agent developed in house to implement
> STONITH.  While it was no trouble to compile and install the code,
> named mgpstonith, I see lots of messages like the following in the
> system log –
> stonith-ng[31120]:    error: Unknown fence agent:
> external/mgpstonith              

Support for the "external" fence agents (a.k.a. Linux-HA-style agents)
is a compile-time option in pacemaker because it requires the third-
party cluster-glue library. CentOS doesn't build with that support.

Your options are either build cluster-glue and pacemaker yourself
instead of using the CentOS pacemaker packages, or rewrite the agent to
be an RHCS-style agent:

> stonith-ng[31120]:    error: Agent external/mgpstonith not found or
> does not support meta-data: Invalid argument (22)
> stonith-ng[31120]:    error: Could not retrieve metadata for fencing
> agent external/mgpstonith                       
> I’ve put debug messages in mgpstonith, and as they do not appear in
> the system log, I’ve inferred that it is in fact never executed.
> Initially, I installed mgpstonith on /lib64/stonith/plugins/external,
> which is where it was located on the old product.  I’ve copied it to
> other locations, e.g. /usr/sbin, with no better luck.  I’ve searched
> the web and while I’ve found lots of information about using the
> available fence agents, I’ve not turned up any information on how to
> create one “from scratch”.
> Specifically, I need to know where to put mgpstonith on the target
> system(s).  Generally, I’d appreciate a pointer to any
> documentation/specification relevant to writing code for a fence
> agent.
> Thanks,
>   Michael
Ken Gaillot <kgaillot at redhat.com>

More information about the Users mailing list