Bug 1692698
Summary: | hammer throws "too few arguments (ArgumentError)" when Satellite returns 500 | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Evgeni Golov <egolov> | ||||
Component: | Hammer | Assignee: | Oleh Fedorenko <ofedoren> | ||||
Status: | CLOSED ERRATA | QA Contact: | Mirek Długosz <mzalewsk> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.5.0 | CC: | apatel, brian.mccafferty, desingh, dhlavacd, kgaikwad, mbacovsk, mshira, rabajaj, vmeghana | ||||
Target Milestone: | 6.8.0 | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | tfm-rubygem-hammer_cli_katello-0.21.0 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-10-27 13:32:10 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: |
|
Description
Evgeni Golov
2019-03-26 09:25:16 UTC
Could you please share debug output of 'hammer -d ping'? Then we can better discuss what should be the appropriate solution. I tried to reproduce and got 500 error containing some backtrace. 500 is generic (unhandled) error and the backtrace is the massage attached by server. Hammer by default prints the error message. Is this the same what you see? Shouldn't the message be improved on the server side? Would be prepending message like "Your server encountred unhandled error:" acceptable solution for you? Prinitng that the server is down on unhandled errors does not seem correct to me. Created attachment 1548695 [details]
hammer -d ping output
Sure, attached.
The error displayed is from hammer, not the one that Satellite suffers (in the pictured case, it's an incompatible GEM, the easiest way to make Satellite not to start up properly).
*** Bug 1707792 has been marked as a duplicate of this bug. *** Created redmine issue https://projects.theforeman.org/issues/27548 from this bug Upstream bug assigned to ofedoren Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27548 has been resolved. As reproducer, I modified foreman_rh_cloud plugin file lib/foreman_rh_cloud/engine.rb to require non-existing foreman version. Then I restarted Satellite services and ran hammer ping. On 6.6: #v+ $ hammer ping Traceback (most recent call last): 14: from /usr/bin/hammer:23:in `<main>' 13: from /usr/bin/hammer:23:in `load' 12: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/bin/hammer:147:in `<top (required)>' 11: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run' 10: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/abstract.rb:68:in `run' 9: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/abstract.rb:72:in `rescue in run' 8: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/abstract.rb:256:in `handle_exception' 7: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/exception_handler.rb:31:in `handle_exception' 6: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/exception_handler.rb:65:in `handle_general_exception' 5: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/exception_handler.rb:48:in `print_error' 4: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/output/output.rb:23:in `print_error' 3: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/output/adapter/abstract.rb:33:in `print_error' 2: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.17.1/lib/hammer_cli/utils.rb:13:in `format' 1: from /opt/theforeman/tfm/root/usr/share/gems/gems/fast_gettext-1.4.1/lib/fast_gettext/vendor/string.rb:70:in `%' /opt/theforeman/tfm/root/usr/share/gems/gems/fast_gettext-1.4.1/lib/fast_gettext/vendor/string.rb:70:in `%': too few arguments (ArgumentError) #v- On 6.8: #v+ $ hammer ping Error: 502 Bad Gateway #v- Tested on: Satellite 6.8.0 snap 5 pulp-server-2.21.2-1.el7sat.noarch satellite-6.8.0-0.4.beta.el7sat.noarch foreman-2.1.0-0.20.rc2.el7sat.noarch katello-3.16.0-0.3.rc1.el7sat.noarch tfm-rubygem-hammer_cli-2.1.1-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman-2.1.1-1.el7sat.noarch tfm-rubygem-hammer_cli_katello-0.22.2-1.el7sat.noarch 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 (Satellite 6.8 Satellite Tools Release), 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://access.redhat.com/errata/RHBA-2020:4367 |