Bug 984424
| Summary: | qpid-config does not throws correct exception when binding nonexisting exchange | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Zdenek Kraus <zkraus> | ||||||
| Component: | qpid-tools | Assignee: | Pavel Moravec <pmoravec> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Michal Toth <mtoth> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | 2.4 | CC: | eallen, jross, mtoth, pmoravec | ||||||
| Target Milestone: | 3.1 | Keywords: | EasyFix, Patch | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | qpid-tools-0.30-1 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2015-04-14 13:46:44 UTC | 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: | |||||||||
| Attachments: |
|
||||||||
Created attachment 773634 [details]
Patch proposal
Created attachment 773641 [details]
Patch proposal #2
I have had a typo in previous patch. I'd manually recreated patch on the other machine, after testing on VM, and made a bad indentation.
This patch is correct. It avoids the bad assumption that the exchange is valid and allows the correct exception to be raised: Committed revision 1607061. Thanks Zdenek for the patch. Comment on attachment 773641 [details]
Patch proposal #2
Removing old review request. The patch was reviewed and committed a while back.
Correct error message is thrown as expected, about non-existing exchange.
$ qpid-config bind "asdf" queue 'x'
Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'not-found: Exchange not found: asdf (/builddir/build/BUILD/qpid-cpp-0.30/src/qpid/broker/ExchangeRegistry.cpp:144)'}
Verified on
qpid-tools-0.30-1.el6
qpid-cpp-server-0.30-2.el6
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. https://rhn.redhat.com/errata/RHEA-2015-0805.html |
Description of problem: When binding nonexisting exchange to a queue, qpid-config failes with attribute error, instead of not-found exception from qmf agent. Version-Release number of selected component (if applicable): qpid-tools-0.22-3.el6.noarch How reproducible: 100% Steps to Reproduce: 1. bind a non existing exchange qpid-config bind "asdf" queue 'x' Actual results: Failed: AttributeError: 'NoneType' object has no attribute 'type' Expected results: exception like with non existing queue Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'not-found: Bind failed. No such exchange: asdf (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/Broker.cpp:1445)'} Additional info: binding non existing queue: qpid-config bind "amq.topic" queue 'x' Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'not-found: Bind failed. No such queue: queue (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/Broker.cpp:1445)'}