Bug 1173534

Summary: Subsequent Queue redirection returns undefined Exception
Product: Red Hat Enterprise MRG Reporter: Zdenek Kraus <zkraus>
Component: qpid-cppAssignee: messaging-bugs <messaging-bugs>
Status: NEW --- QA Contact: Messaging QE <messaging-qe-bugs>
Severity: low Docs Contact:
Priority: low    
Version: DevelopmentCC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zdenek Kraus 2014-12-12 11:45:16 UTC
Description of problem:
multiple queue redirecting (or redirecting already redirecred queue) by QMF call broker.queueRedirect returns undefined exception: {'_values': {'error_code': 65536, 'error_text': None}

Version-Release number of selected component (if applicable):
qpid-cpp-server-0.30-4.el6.i686

How reproducible:
100%

Steps to Reproduce:
1. create 2 queues
qpid-config add queue a; qpid-config add queue b
2. redirect for the 1st time
qmf2_qpid_ctrl --class broker --id amqp-broker queueRedirect sourceQueue=a targetQueue=b
3. subsequent redirection
qmf2_qpid_ctrl --class broker --id amqp-broker queueRedirect sourceQueue=a targetQueue=b

Actual results:
[2]
{}
[3]
{'_values': {'error_code': 65536, 'error_text': None}}

Expected results:
[3]
{'_values': {'error_code': <SOME-SANE-CODE>, 'error_text': 'Queue is already redirected a->b'}}


Additional info:
Please note that after redirecting a->b, same behavior is observed when trying to redirect b->a and a->c, which is expected and correct, (but still exception is incorrect)

Comment 2 Zdenek Kraus 2014-12-15 16:16:52 UTC
Just to add, same Exception is present, when redirecting a->a, in that case error_text should state, redirecting in loop is not possible or something like that.

Comment 3 Chuck Rolke 2014-12-15 20:04:53 UTC
The interface between QMF and the broker allows the return of the status code (int) value. Common errors get converted to useful text like 'unknown object' or 'unknown method'. In cases described here the string describing the error is placed in the error log but it is not passed back to the QMF caller.

  Manageable::status_t Broker::queueRedirect(...)

The suite of broker mananagement methods need a return interface that allows descriptive strings in addition to the simple status_t code.