[ClusterLabs] Error creating a fence mechanism

Tomas Jelinek tojeline at redhat.com
Tue Mar 22 04:31:34 EDT 2016


Dne 21.3.2016 v 21:17 Douglas Restrepo napsal(a):
> Hi guys,
>
> Im trying to create a new cluster using pacemaker but Im having a
> problem with the fence mechanism.
> Until de moment I have perform the following tasks:
>
> + I have installed two different machines with centos 7 (infrastructure
> mode).
> + Each machine have been configured with two network cards (one for
> management and a second one for service)
> + Corosync pacemaker pcs dlm dlm-lib fence-agents-all lvm2-cluster have
> been installed
> + The corosync.conf file is configured.
> + The cluster have been initialized using pcs cluster start --all
> + At executing the pcs status command, I get the following output
>
> Cluster name: mycluster-ha
> WARNING: no stonith devices and stonith-enabled is not false
> Last updated: Sat Mar 19 10:01:43 2016          Last change: Fri Mar 18
> 03:36:23 2016 by root via cibadmin on node-01
> Stack: corosync
> Current DC: node-01 (version 1.1.13-10.el7_2.2-44eb2dd) - partition with
> quorum
> 2 nodes and 0 resources configured
>
> Online: [ node-01 node-02 ]
>
> Full list of resources:
>
> PCSD Status:
>    node-01: Online
>    node-02: Online
>
> Daemon Status:
>    corosync: active/disabled
>    pacemaker: active/disabled
>    pcsd: active/enabled
>
>
> The problem what Im having is that I don't have a physical PDU, so I
> have to simulate one.
> For this purpose I have created a fence script in python  and it has
> been added to the /usr/sbin folder (with its respective permissions),
> where are located the all fence scripts.
>
> Now, when a execute the command pcs stonith list I get the output
> Error: no metadata for /usr/sbin/fence_manual

Hi,

This message means your fence agent does not exit with return code 0 
when pcs tries to get its metadata by running /usr/sbin/fence_manual -o 
metadata

>
> Any way, to add the fence mechanism I executed the command
>
> #pcs cluster cib stonith_cfg
> #pcs -f stonith_cfg stonith create fence_node_01 fence_manual
> ipadd="node-01" action="off" passwd="passwd" login="admin"
> pcmk_host_list="node-01" op monitor interval=60s
>
> but after this I get the output
> Error: Unable to create resource stonith fence_manual, it is not
> installed on this system (use --force to override)

This is the same issue.

>
> By using the --option, the resource is added, but its status is always
> stopped.
>
> By executing again the command pcs status give me the following output
>
> *Cluster name:* mycluster-ha
> *Last updated*: Thu Mar 17 06:38:52 2016          Last change: Thu Mar
> 17 06:26:17 2016 by root via cibadmin on node-01
> *Stack:* corosync
> *Current DC:* node-01 (version 1.1.13-10.el7_2.2-44eb2dd) - partition
> with quorum
> 2 nodes and 1 resource configured
>
> Online:[ node-01 node-02 ]
>
> *Full list of resources:*
>
>   fence_node-01  (stonith:fence_manual): *Stopped*
>
> *Failed Actions:*
> * fence_node-01_start_0 on node-02 'unknown error' (1): call=6,
> status=Error, exitreason='none',
>      last-rc-change='Thu Mar 17 23:11:30 2016', queued=0ms, exec=2008ms
> * fence_node-01_start_0 on node-01 'unknown error' (1): call=6,
> status=Error, exitreason='none',
>      last-rc-change='Thu Mar 17 06:30:01 2016', queued=0ms, exec=2007ms

Looks like your fence agent does not support monitoring either.

>
> *
> PCSD Status:*
>    node-01: Online
>    node-02: Online
>
> *Daemon Status:*
> *corosync:* active/disabled
> *pacemaker:* active/disabled
> *pcsd:* active/enabled
>
> So to remove this error and go back to the previous status I executed
> the command
>
> pcs resource cleanup fence_node_01
>
> but now, when I execute the command
> pcs stonith list
>
> Im getting the error
> Error: unable to locate command: /usr/sbin/fence_manual
>
> Can someone guide me with this process?
> I don´t know why im getting this error configuring the fence mechanism.
>
> How can I add a new fence mechanism to the system, and it to be detected
> by the pcs?

You may start by taking a look at existing fence agents and documentation at
https://github.com/ClusterLabs/fence-agents
and
https://fedorahosted.org/cluster/wiki/fence-agents

Hope that helps,
Tomas

>
> Thanks in advance
>
>
> PD: SELinux is disabled (temporally) to avoid any problem in
> communications with the nodes.
>
>
>
>
> _______________________________________________
> 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