Bug 902460 - traceback on invalid data supplied on command line
Summary: traceback on invalid data supplied on command line
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 17:59 UTC by Jaroslav Kortus
Modified: 2013-11-21 11:50 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-11-21 11:50:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System 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 21:53:48 UTC

Description Jaroslav Kortus 2013-01-21 17:59:25 UTC
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 21:25:13 UTC
[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 11:50:58 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.

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.