Bug 601828 - QMF Agent returning STATUS_USER returns error 7 to QMF Console
Summary: QMF Agent returning STATUS_USER returns error 7 to QMF Console
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
(Show other bugs)
Version: 1.2
Hardware: All Linux
low
high
Target Milestone: 1.3
: ---
Assignee: messaging-bugs
QA Contact: Jan Sarenik
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 563818
TreeView+ depends on / blocked
 
Reported: 2010-06-08 17:46 UTC by Matthew Farrellee
Modified: 2011-08-12 16:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the error codes supplied by a QMF agent were being sent back as only one type of an exception. This rendered the error codes unusable for debugging the QMF agent's behavior. With this update, the QMF implementation logic was changed to accommodate error return codes for every error produced. Error codes can now be sent by a QMF agent and be distinguished by the QMF console.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-14 15:58:18 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
MethodTest Agent (4.30 KB, text/x-c++src)
2010-06-08 17:47 UTC, Matthew Farrellee
no flags Details
MethodTest QMF Schema (1.05 KB, text/xml)
2010-06-08 17:47 UTC, Matthew Farrellee
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0773 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging and Grid Version 1.3 2010-10-14 15:56:44 UTC

Description Matthew Farrellee 2010-06-08 17:46:47 UTC
qpid-tool session --

qpid: list methodtest
Object Summary:
    ID   Created   Destroyed  Index
    ============================================
    138  00:00:00  -          test:methodtest:
qpid: schema methodtest
Object Class: Table Class: test:methodtest(8d301221-07bd-5e35-3e18-59626ef74dd9) 

  Method: SuccessNoOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: SuccessNoOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: SuccessWithOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: SuccessWithOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorNoOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorNoOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorWithOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorWithOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                
qpid: call 138 SuccessNoOutputNoText
qpid: OK (0) - {u'output': ''}
qpid: call 138 SuccessNoOutputWithText
qpid: OK (0) - {u'output': ''}
qpid: call 138 SuccessWithOutputNoText
qpid: OK (0) - {u'output': 'SuccessWithOutputNoText'}
qpid: call 138 SuccessWithOutputWithText
qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'}
call 138 SuccessWithOutputWithText
qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'}
qpid: call 138 ErrorNoOutputNoText
qpid: error (7) - {}
qpid: call 138 ErrorNoOutputWithText
qpid: error (7) - {}
qpid: call 138 ErrorWithOutputNoText
qpid: error (7) - {}
qpid: call 138 ErrorWithOutputWithText
qpid: error (7) - {}
qpid: quit
Exiting...


QMF C++ Agent session --

$ ./a.out 
SignalFD: 7
Waiting...1
SuccessNoOutputNoText called
Waiting...2
SuccessNoOutputWithText called
Waiting...3
SuccessWithOutputNoText called
Waiting...4
SuccessWithOutputWithText called
Waiting...5
SuccessWithOutputWithText called
Waiting...6
ErrorNoOutputNoText called
Waiting...7
ErrorNoOutputWithText called
Waiting...8
ErrorWithOutputNoText called
Waiting...9
ErrorWithOutputWithText called
Waiting...10


Expected output for qpid-tool session...

For all Error cases, the agent supplied error code should be returned and possibly error text.

Comment 1 Matthew Farrellee 2010-06-08 17:47:23 UTC
Created attachment 422284 [details]
MethodTest Agent

Comment 2 Matthew Farrellee 2010-06-08 17:47:48 UTC
Created attachment 422285 [details]
MethodTest QMF Schema

Comment 3 Ted Ross 2010-06-11 21:47:55 UTC
Fixed upstream in revision 953885.

Comment 4 Jan Sarenik 2010-06-23 10:01:43 UTC
Matt, this simple example is a perfect fit for Bug 606391.

All that is needed to compile and run the example is to
install qmf-devel and qpid-cpp-server (incl. dependencies)
and cyrus-sasl-plain (see the above mentioned bug).

  # qmf-gen MethodTest.xml
  ...
  # gcc -g  MethodTest.cpp test/MethodTest.cpp -lqpidcommon -lqpidclient -lqmf
  # ./a.out

Comment 5 Jan Sarenik 2010-06-23 10:08:25 UTC
This is my session on RHEL5 x86_64, packages
  python-qmf-0.7.946106-4.el5
  python-qpid-0.7.946106-2.el5
  qmf-devel-0.7.946106-4.el5
  qpid-cpp-client-devel-0.7.946106-4.el5
  qpid-cpp-server-0.7.946106-4.el5
  qpid-tools-0.7.946106-4.el5

------------------------------------------------------------------------
# qpid-tool 
Management Tool for QPID
qpid: list methodtest
Object Summary:
    ID   Created   Destroyed  Index
    ============================================
    101  10:02:48  -          test:methodtest:
qpid: schema methodtest
Object Class: Table Class: test:methodtest(8d301221-07bd-5e35-3e18-59626ef74dd9) 

  Method: SuccessNoOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: SuccessNoOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: SuccessWithOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: SuccessWithOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorNoOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorNoOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorWithOutputNoText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                

  Method: ErrorWithOutputWithText
    Argument  Type         Direction  Unit  Description
    =====================================================
    output    long-string  O                
qpid: call 101 SuccessNoOutputNoText
qpid: OK (0) - {u'output': ''}

qpid: call 101 SuccessNoOutputWithText
qpid: OK (0) - {u'output': ''}

qpid: call 101 SuccessWithOutputNoText
qpid: OK (0) - {u'output': 'SuccessWithOutputNoText'}

qpid: call 101 SuccessWithOutputWithText
qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'}

qpid: call 101 SuccessWithOutputWithText
qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'}

qpid: call 101 ErrorNoOutputNoText
qpid:  (67482) - {}

qpid: call 101 ErrorNoOutputWithText
qpid: Error no output (67512) - {}

qpid: call 101 ErrorWithOutputNoText
qpid:  (67516) - {}

qpid: call 101 ErrorWithOutputWithText
qpid: Error with output (67520) - {}

qpid: quit
Exiting...
------------------------------------------------------------------------

Comment 6 Jan Sarenik 2010-06-23 10:13:18 UTC
I would expect something like:

qpid: call 101 ErrorWithOutputNoText
qpid:  (67516) - {u'output': 'ErrorWithOutputNoText'}

and so on. Am I right?

Comment 7 Matthew Farrellee 2010-06-23 11:55:37 UTC
Let's check with Ted - when an error (STATUS_USER) is returned, are output parameters also returned? If so, we have a new BZ, if not we're good.

Comment 8 Ted Ross 2010-07-20 14:30:30 UTC
Output parameters are only returned if the status is SUCCESS.  In all failure cases, the only data returned is the error code and a text string.

Note that this is for QMFv1 only.  In QMFv2, errors are reported via exception which can carry arbitrary data.

-Ted

Comment 9 Jan Sarenik 2010-07-20 14:55:39 UTC
This way I consider it VERIFIED. Thanks for comment.

Comment 10 Martin Prpič 2010-10-07 12:47:05 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:
Previously, the error codes supplied by a QMF agent were being sent back as only one type of an exception. This rendered the error codes unusable for debugging the QMF agent's behavior. With this update, the QMF implementation logic was changed to accommodate error return codes for every error produced. Error codes can now be sent by a QMF agent and be distinguished by the QMF console.

Comment 12 errata-xmlrpc 2010-10-14 15:58:18 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


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