Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 902460 - traceback on invalid data supplied on command line
traceback on invalid data supplied on command line
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Chris Feist
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-21 12:59 EST by Jaroslav Kortus
Modified: 2013-11-21 06:50 EST (History)
4 users (show)

See Also:
Fixed In Version: pcs-0.9.64-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Bad (or unrecognized) arguments were supplied to pcs resource create Consequence: Instead of printing a useful error message pcs would error out and provide a traceback Fix: Allow pcs to detect unrecognized arguments and print a useful error message Result: When users give pcs bad options they are given a useful error message to make it easier to fix their issue.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 06:50:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1633 normal SHIPPED_LIVE pcs bug fix and enhancement update 2013-11-20 16:53:48 EST

  None (edit)
Description Jaroslav Kortus 2013-01-21 12:59:25 EST
Description of problem:
$ pcs resource create dummystateful nonsense op monitor="5s"
Traceback (most recent call last):
  File "/usr/sbin/pcs", line 87, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/pcs", line 69, in main
    resource.resource_cmd(argv)
  File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 46, in resource_cmd
    resource_create(res_id, res_type, ra_values, op_values)
  File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 218, in resource_create
    op_attributes = convert_args_to_operations(op_values, ra_id)
  File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 459, in convert_args_to_operations
    op_attrs.append(("id",ra_id+"-"+a+"-"+b))
UnboundLocalError: local variable 'a' referenced before assignment

Version-Release number of selected component (if applicable):
pcs-0.9.26-9.el6.noarch

How reproducible:
always 

Steps to Reproduce:
1. pcs resource create dummystateful nonsense op monitor="5s"
2.
3.
  
Actual results:
traceback

Expected results:
error message with complaint what it does not like (if possible). Exit code > 0.

Additional info:
Comment 9 Chris Feist 2013-08-13 17:25:13 EDT
[root@ask-02 ~]# pcs resource create dummystateful nonsense op monitor="5s"
Error: Unable to create resource 'nonsense', it is not installed on this system (use --force to override)
Comment 12 errata-xmlrpc 2013-11-21 06:50:58 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-1633.html

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