Bug 1155553
| Summary: | qpid-tool to halt when initial connection to broker failed | ||
|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Pavel Moravec <pmoravec> |
| Component: | qpid-tools | Assignee: | Pavel Moravec <pmoravec> |
| Status: | CLOSED ERRATA | QA Contact: | Petr Matousek <pematous> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0 | CC: | jross, pematous, pmoravec, zkraus |
| Target Milestone: | 3.2 | Keywords: | Improvement, TestCaseProvided |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | qpid-tools-0.32-1 | Doc Type: | Bug Fix |
| Doc Text: |
When the +qpid-tool+ was run with invalid credentials or an incorrect host name, the tool did not raise an exception or warning. This lack of context left the user with the impression that the tool connected successfully, when this was not the case. +qpid-tool+ now prints a warning to stdout: `qpid: Failed to connect: Exception during connection setup: error - [Errno 111]` if incorrect parameters are passed while the broker is not running.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-10-08 13:09:41 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: | |||
|
Description
Pavel Moravec
2014-10-22 11:13:49 UTC
Upstream review request: https://reviews.apache.org/r/27032/ Committed revision 1633818. The decision taken was qpid-tool should print warning to stdout, like: $ ./tools/src/py/qpid-tool Management Tool for QPID qpid: Failed to connect: Exception during connection setup: error - [Errno 111] Connection refused (when broker is not running) Ahem, should really change the Rel Note status to ? so it isn't included accidentally. Please verify and let me know once the ticket passes through QA. (In reply to Jared MORGAN from comment #4) > Ahem, should really change the Rel Note status to ? so it isn't included > accidentally. Please verify and let me know once the ticket passes through > QA. Sounds fine, just the latest line "Result:" seems to be extra. Halting or printing to stderr would be better. But as the tool prints to stdout _any_ exception (i.e. forget to provide arguments of a method and you get:
def do_call(self, data):
try:
self.dataObject.do_call(data)
except Exception, e:
print "Exception in do_call: %r", e
), I would say it is sufficient fix. (I havent tried the fix by myself, but I "just" say warning/exception print to stdout and nothing else is a sufficient fix for me).
This fix improves qpid-tool error handling by simply printing out an error message when connection to the broker fails. Qpid-tool does not exit, that should be fine wrt comment 9. Error messages are printed to stdout instead of stderr, but this is already tracked by bug 849917 and bug 1082102. packages: qpid-tools-0.34-1 -> VERIFIED 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-1879.html |