Bug 886232

Summary: no stonith resource agents available
Product: Red Hat Enterprise Linux 7 Reporter: michal novacek <mnovacek>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: fdinitto, rsteiger, slevine, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.128-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: A. User lists fence agents when no fence agents are installed. B. User lists fence agents and specifies filter so no fence agent match the filter. Consequence: Pcs provides no output. Fix: Check for the empty fence agents list and display a message to the user. Result: Pcs prints message there are no fence agents available / matching the filter.
Story Points: ---
Clone Of:
: 1129842 (view as bug list) Environment:
Last Closed: 2015-03-05 09:18:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 883874, 1080147, 1129842    
Attachments:
Description Flags
proposed fix none

Description michal novacek 2012-12-11 20:45:11 UTC
Description of problem:
Going through setting cluster from scratch [1], 9.3, running 
"pcs stonith list" returns no results

$ pcs status
Last updated: Tue Dec 11 14:43:21 2012
Last change: Tue Dec 11 07:10:51 2012 via cibadmin on node01
Stack: corosync
Current DC: node02 (2) - partition with quorum
Version: 1.1.8-4.el7-5db5f53
3 Nodes configured, unknown expected votes
0 Resources configured.

Online: [ node01 node02 node03 ]

Full list of resources:

$ pcs stonith list
$ echo $?
0
$stonith_admin -L
No devices available
$ rpm -q pcs
pcs-0.9.26-1.el7.x86_64

This is on RHEL-7.0-20120711.2.

Additional info:
[1]: http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Clusters_from_Scratch/index.html#_configuring_stonith

Comment 2 michal novacek 2013-03-04 14:56:34 UTC
This means that fence-* package is not installed (most likely users wanting fence-agents or fence-virt). 

This might be confusing as it is not mentioned in the documentation so it should be mentioned there or it should be added as dependancy to pcs as most of the people would want fencing anyway.

Comment 4 Chris Feist 2014-07-10 21:10:48 UTC
Right now we don't require those packages since pcs can be run on a machine that doesn't have the cluster installed (it can control remote cluster nodes).  It does make sense to add an error message when they're running 'pcs stonith list' and nothing shows up (same for 'pcs resource list')

Comment 7 Tomas Jelinek 2014-09-16 11:12:12 UTC
Created attachment 937931 [details]
proposed fix

Test:

1. Filter fence agents using non-matching filter
[root@rh70-node1 ~]# pcs stonith list badfilter
Error: No stonith agents matching the filter.
[root@rh70-node1 ~]# echo $?
1

2. Remove fence agents
[root@rh70-node1 ~]# yum remove fence-agents-*
[root@rh70-node1 ~]# yum remove fence-virt

3. List fence agents
[root@rh70-node1 ~]# pcs stonith list
Error: No stonith agents available. Do you have fence agents installed?
[root@rh70-node1 ~]# echo $?
1

4. Filter resources using non-matching filter
[root@rh70-node1 ~]# pcs resource list badfilter
Error: No resource agents matching the filter.
[root@rh70-node1 ~]# echo $?
1

Comment 8 Tomas Jelinek 2014-09-18 13:18:53 UTC
Before Fix:
[root@rh70-node1 ~]# rpm -q pcs
pcs-0.9.115-32.el7.x86_64
[root@rh70-node1 ~]# pcs stonith list badfilter
[root@rh70-node1 ~]# echo $?
0
[root@rh70-node1 ~]# yum remove fence-agents-* fence-virt
{output omitted}
[root@rh70-node1 ~]# pcs stonith list
[root@rh70-node1 ~]# echo $?
0
[root@rh70-node1 ~]# pcs resource list badfilter
[root@rh70-node1 ~]# echo $?
0

After Fix:
[root@rh70-node1 ~]# rpm -q pcs
pcs-0.9.128-1.el7.x86_64
[root@rh70-node1 ~]# pcs stonith list badfilter
Error: No stonith agents matching the filter.
[root@rh70-node1 ~]# echo $?
1
[root@rh70-node1 ~]# yum remove fence-agents-* fence-virt
{output omitted}
[root@rh70-node1 ~]# pcs stonith list
Error: No stonith agents available. Do you have fence agents installed?
[root@rh70-node1 ~]# echo $?
1
[root@rh70-node1 ~]# pcs resource list badfilter
Error: No resource agents matching the filter.
[root@rh70-node1 ~]# echo $?
1

Comment 12 errata-xmlrpc 2015-03-05 09:18:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0415.html