Bug 505314

Summary: qpid-tool crashes down after input wrong command list query
Product: Red Hat Enterprise MRG Reporter: Martin Kudlej <mkudlej>
Component: qpid-qmfAssignee: Nuno Santos <nsantos>
Status: CLOSED ERRATA QA Contact: Martin Kudlej <mkudlej>
Severity: low Docs Contact:
Priority: low    
Version: 1.1.1CC: aortega, gsim, tross
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The qpid-tool utility crashed after executing the "list" query command due to a typing error and missing exception-handling. With this update, exceptions are handled and the type error fixed so that the "list" command is no longer able to crash qpid-tool.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:15:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Kudlej 2009-06-11 13:30:41 UTC
Description of problem:
qpid-tool crashes down after input wrong command list query


Version-Release number of selected component (if applicable):
python-qpid-0.5.752581-2.el5 and python-qpid-0.5.752581-2.el5


How reproducible:
100%

Steps to Reproduce:
1) run qpid-tool
2) list
3) list org.apache.qpid.broker:queue
4) list 103.mgmt-dell-pe650-01.rhts.bos.redhat.com.24462 - expect
queue id

Actual results:
qpid: list 103.mgmt-dell-pe650-01.rhts.bos.redhat.com.24462
Traceback (most recent call last):
  File "/usr/bin/qpid-tool", line 192, in ?
    cli.cmdloop ()
  File "/usr/lib/python2.4/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.4/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/bin/qpid-tool", line 117, in do_list
    self.dataObject.do_list (data)
  File "/usr/lib/python2.4/site-packages/qpid/managementdata.py", line 719, in do_list
    self.listObjects (tokens)
  File "/usr/lib/python2.4/site-packages/qpid/managementdata.py", line 454, in listObjects
    classKey = self.getClassKey (tokens[0])
  File "/usr/lib/python2.4/site-packages/qpid/managementdata.py", line 290, in getClassKey
    schemaRev = int(className[delim + 1:])
ValueError: invalid literal for int(): mgmt-dell-pe650-01.rhts.bos.redhat.com.24462

Expected results:
Nothing happens likewise "show 103.mgmt-dell-pe650-01.rhts.bos.redhat.com.24462"

Comment 2 Ted Ross 2010-05-25 19:48:42 UTC
Two things:

1) Exception handling has been added to the qpid-tool command handlers so an exception will not crash the program.  This was added upstream at revision 946178.

2) "list" and "show" do not expect object indexes in that form.  "list" expects a class/package name and "show" expects a numeric ID (i.e. 103).

Comment 4 Martin Prpič 2010-10-07 14:10:37 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The qpid-tool crashed after executing a wrong 'list' query command. With this update, the 'list' query command works as expected.

Comment 5 Douglas Silas 2010-10-11 09:52:25 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The qpid-tool crashed after executing a wrong 'list' query command. With this update, the 'list' query command works as expected.+The qpid-tool utility crashed after executing the "list" query command due to a typing error and missing exception-handling. With this update, exceptions are handled and the type error fixed so that the "list" command is no longer able to crash qpid-tool.

Comment 7 errata-xmlrpc 2010-10-14 16:15:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0773.html