[ClusterLabs] fence agent and using it with pacemaker

Stanislav Kopp staskopp at gmail.com
Thu Feb 11 11:33:39 EST 2016


Hi Dejan

2016-02-11 16:45 GMT+01:00 Dejan Muhamedagic <dejanmm at fastmail.fm>:
> Hi,
>
> On Thu, Feb 11, 2016 at 03:56:15PM +0100, Stanislav Kopp wrote:
>> HI again,
>>
>> I think I've sorted it out, correct me if I'm wrong.
>>
>> - "fence-agents" are RHCS compatible fence agents (for using with
>> RGmanager originally?) located in /usr/sbin/fence_*,
>
> Yes.
>
>> - "cluster-glue" provides agents compatible with pacemaker, they re
>> located in "/usr/lib/stonith/plugins/"
>
> Right. But today pacemaker supports both. I don't recall anymore
> with which release support for fencing agents was introduced. The
> support is compile-time and RHEL includes support for only
> fencing agents, whereas most other distributions include support
> for both.

I think this is it, the pacemaker in Debian Wheezy is too old to
understand RHCS agents, I've tested "fence_pve" in Debian Jessie with
self-compiled pacemaker 1.1.12 and added it as stonith resource
without a problem.

Thank you for clearing that up!

Best,
Stan



>> "fence_pve" [1] agent looks like RHCS agent, so it doesn't work
>> out-of-box with pacemaker, but like Dejan hints, it's possible to use
>> rhcs "adapter" to use RH fencing agent in pacemaker. Unfortunally I
>> don't have
>>
>> /usr/lib{,64}/stonith/plugins/rhcs directory in Debian (only rhcs.so
>> lib), can't find it via "yum provides" in Centos 7 either.
>
> You won't find it in Centos or RHEL.
>
>> Is there some documentation how to use RHCS fence agent with pacemaker
>> esp. with crmsh examples?
>
> Well, no, but it should be easy. You just create that directory
> and then create a link to your fencing agent:
>
> # mkdir /usr/lib{,64}/stonith/plugins/rhcs
> # cd /usr/lib{,64}/stonith/plugins/rhcs
> # ln -s /usr/sbin/fence_pve
>
> Thanks,
>
> Dejan
>
>>
>> Best,
>> Stan
>>
>> [1] https://github.com/ClusterLabs/fence-agents/blob/master/fence/agents/pve/fence_pve.py
>>
>> 2016-02-11 12:07 GMT+01:00 Stanislav Kopp <staskopp at gmail.com>:
>> > HI Dejan,
>> >
>> > 2016-02-10 20:28 GMT+01:00 Dejan Muhamedagic <dejanmm at fastmail.fm>:
>> >> Hi,
>> >>
>> >> On Wed, Feb 10, 2016 at 03:20:49PM +0100, Stanislav Kopp wrote:
>> >>> Hi all,
>> >>>
>> >>> I have general, clarification question about how fence agents work
>> >>> with pacemaker (crmsh in particular). As far I understood STDIN
>> >>
>> >> Not sure what crmsh has to do with fencing agents. The
>> >> interaction happens between other pacemaker components (normally
>> >> stonithd) and the agent.
>> >
>> > I've mentioned crm, to make sure it's not some stupid syntax error by
>> > me with stonith definition.
>> >
>> >>> arguments can be used within pacemaker resources and command line
>> >>> arguments in terminal (for testing and scripting?).
>> >>
>> >> As for testing, crmsh has support for resource testing with
>> >> 'configure rsctest', but apparently only Linux HA stonith agents
>> >> (legacy*) are currently supported.
>> >>
>> >> Otherwise, there's stonith_admin(8) and stonith(8) for stonith
>> >> agents. The former uses stonith-ng (stonithd) which makes it
>> >> closer to the real cluster operation.
>> >>
>> >> There is also a (not so well known) stonith interface to fencing
>> >> agents, which predates RH fencing agents support in pacemaker.
>> >> One just needs to create a link in /usr/lib64/stonith/plugins/rhcs:
>> >
>> > That sounds interesting, because the agent (fence_pve) comes with
>> > "fence-agents" package, and not with "cluster-glue" (in Debian), Do
>> > you know, what is difference between agents in /usr/sbin/ (like
>> > "/usr/sbin/fence_ilo") and in "/usr/lib/stonith/plugins/external/"?
>> >
>> > Thanks,
>> > Stan
>> >
>> >> lrwxrwxrwx 1 root root 32 Nov 18 07:56 fence_cisco_ucs -> ../../../../sbin/fence_cisco_ucs
>> >>
>> >> For instance, this agent is referenced as stonith:rhcs/cisco_ucs.
>> >>
>> >> Finally, it would be great to somehow put together the two
>> >> fencing/stonith agents sets.
>> >>
>> >> Thanks,
>> >>
>> >> Dejan
>> >>
>> >> *) Why the Linux HA stonith agents got the attribute/name
>> >> "legacy" in Pacemaker at some point is beyond me.
>> >>
>> >>> I have "fence_pve" [1] agent which works fine with command line
>> >>> arguments, but not with pacemaker, it says some parameters like
>> >>> "passwd" or "login" does not exist, although STDIN parameters are
>> >>> supported [2]
>> >>>
>> >>> I'm using  stock 1.1.7-1 on Debian Wheezy
>> >>>
>> >>> Best,
>> >>> Stan
>> >>>
>> >>>
>> >>> [1] https://github.com/ClusterLabs/fence-agents/blob/master/fence/agents/pve/fence_pve.py
>> >>> [2] https://www.mankier.com/8/fence_pve#Stdin_Parameters
>> >>>
>> >>> _______________________________________________
>> >>> Users mailing list: Users at clusterlabs.org
>> >>> http://clusterlabs.org/mailman/listinfo/users
>> >>>
>> >>> Project Home: http://www.clusterlabs.org
>> >>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> >>> Bugs: http://bugs.clusterlabs.org
>> >>
>> >> _______________________________________________
>> >> Users mailing list: Users at clusterlabs.org
>> >> http://clusterlabs.org/mailman/listinfo/users
>> >>
>> >> Project Home: http://www.clusterlabs.org
>> >> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> >> Bugs: http://bugs.clusterlabs.org
>>
>> _______________________________________________
>> Users mailing list: Users at clusterlabs.org
>> http://clusterlabs.org/mailman/listinfo/users
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org




More information about the Users mailing list