Bug 1403832

Summary: Wrong error text, when running 'pcs resource clear'
Product: Red Hat Enterprise Linux 7 Reporter: Steffen Froemer <sfroemer>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.3CC: cfeist, cluster-maint, idevat, omular, rsteiger, tojeline
Target Milestone: rcKeywords: EasyFix
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.165-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 08:05:31 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:
Attachments:
Description Flags
proposed fix + test none

Description Steffen Froemer 2016-12-12 12:58:09 UTC
Description of problem:
On running `pcs resource clear`, a wrong errormessage is shown.

Version-Release number of selected component (if applicable):
pcs-0.9.152-10.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install package pcs
2. run `pcs resource clear`
3.

Actual results:
[root@vagrant-redhat7 ~]# pcs resource clear
Error: must specify resource to move/unmove


Expected results:
[root@vagrant-redhat7 ~]# pcs resource clear
Error: must specify resource to clear


Additional info:
calling `--help` works as expected

[root@vagrant-redhat7 ~]# pcs resource clear --help

Usage: pcs resource clear...
    clear <resource id> [node] [--master] [--wait[=n]]
        Remove constraints created by move and/or ban on the specified
        resource (and node if specified).
        If --master is used the scope of the command is limited to the
        master role and you must use the master id (instead of the resource id).
        If --wait is specified, pcs will wait up to 'n' seconds for the
        operation to finish (including starting and/or moving resources if
        appropriate) and then return 0 on success or 1 on error.  If 'n' is not
        specified it defaults to 60 minutes.

Comment 1 Tomas Jelinek 2017-12-08 15:42:09 UTC
Created attachment 1364943 [details]
proposed fix + test

Comment 4 Ivan Devat 2018-06-26 06:57:56 UTC
After Fix:

[ant ~] $ rpm -q pcs pcs-snmp
pcs-0.9.165-1.el7.x86_64
pcs-snmp-0.9.165-1.el7.x86_64

[ant ~] $ pcs resource move
Error: must specify a resource to move
[ant ~] $ pcs resource ban
Error: must specify a resource to ban
[ant ~] $ pcs resource clear 
Error: must specify a resource to clear

Comment 7 errata-xmlrpc 2018-10-30 08:05:31 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://access.redhat.com/errata/RHBA-2018:3066