Cause
When listing queues using 'qpid-config queues <queue_name>', qpid-config always
returns 0, regardless of whether the queue exists. Similar behavior for listing exchanges.
Consequence
Scripts that use the return code of qpid-config to detect the presence of a queue or exchange will not work.
Fix
The fix makes qpid-config return the correct/expected return code, based on the existence of the named queue. The fix also corrects similar behavior for listing exchanges.
Result
Scripts can now make use of the return code from qpid-config when listing named queues or exchanges.
This issue has been fixed.
Verified on RHEL5.7 and RHEL6.2, architectures: x86_64, i686
packages installed:
qpid-cpp-mrg-0.14-3.el5
qpid-cpp-0.14-1.el6
-> VERIFIED
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:
Cause
When listing queues using 'qpid-config queues <queue_name>', qpid-config always
returns 0, regardless of whether the queue exists. Similar behavior for listing exchanges.
Consequence
Scripts that use the return code of qpid-config to detect the presence of a queue or exchange will not work.
Fix
The fix makes qpid-config return the correct/expected return code, based on the existence of the named queue. The fix also corrects similar behavior for listing exchanges.
Result
Scripts can now make use of the return code from qpid-config when listing named queues or exchanges.
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/RHSA-2012-0529.html
Description of problem: When listing queues using 'qpid-config queues <queue_name>', qpid-config returns always '0' (regardless whether queue exists) [root ~]# qpid-config add queue queue_test [root ~]# qpid-config queues queue_test Queue Name Attributes =================================== queue_test [root ~]# echo $? 0 [root ~]# qpid-config del queue queue_test [root ~]# qpid-config queues queue_test Queue Name Attributes =================================== [root ~]# echo $? 0 'qpid-config queues' behavior is fine, but 'qpid-config queues <queue_name>' should behave more like grep. Version-Release number of selected component (if applicable): qpid-tools-0.10-5.el6.noarch qpid-tools-0.7.946106-12.el5 How reproducible: 100% Steps to Reproduce: 1. qpid-config add queue queue_test 2. qpid-config queues queue_test 3. echo $? 4. qpid-config del queue queue_test 5. qpid-config queues queue_test 6. echo $? Actual results: Queue doesn't exist -> return code '0' Expected results: Queue doesn't exist -> return code '1' ("grep-like" behavior) Additional info: