Bug 1403832 - Wrong error text, when running 'pcs resource clear'
Summary: Wrong error text, when running 'pcs resource clear'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-12 12:58 UTC by Steffen Froemer
Modified: 2018-10-30 08:06 UTC (History)
6 users (show)

Fixed In Version: pcs-0.9.165-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 08:05:31 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed fix + test (1.79 KB, patch)
2017-12-08 15:42 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3066 0 None None None 2018-10-30 08:06:10 UTC

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


Note You need to log in before you can comment on or make changes to this bug.