Actions
Bug #27548
closedhammer throws "too few arguments (ArgumentError)" when Satellite returns 500
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1692698
Description of problem:
When Satellite returns 500 errors (because Passenger is unhappy), running hammer commands like "hammer ping" results in an ugly error instead of a nice message saying that the Satellite could not be reached.
Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli-0.15.1.1-1.el7sat.noarch
How reproducible:
100%
Steps to Reproduce:
1. make Passenger return an error (like "Web application could not be started" by installing an incompatible GEM version)
2. hammer ping
- hammer ping
Traceback (most recent call last):
14: from /bin/hammer:23:in `<main>'
13: from /bin/hammer:23:in `load'
12: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.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.15.1.1/lib/hammer_cli/abstract.rb:28:in `run'
9: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.1/lib/hammer_cli/abstract.rb:32:in `rescue in run'
8: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.1/lib/hammer_cli/abstract.rb:188:in `handle_exception'
7: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.1/lib/hammer_cli/exception_handler.rb:31:in `handle_exception'
6: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.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.15.1.1/lib/hammer_cli/exception_handler.rb:48:in `print_error'
4: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.1/lib/hammer_cli/output/output.rb:23:in `print_error'
3: from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1.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.15.1.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)
A human readable error. Compare this to the error you get when httpd is completely down:
- hammer ping
Could not load the API description from the server:
Failed to open TCP connection to sat-6-5-qa-rhel7.kangae.example.com:443 (Connection refused - connect(2) for "sat-6-5-qa-rhel7.kangae.example.com" port 443)
- is the server down?
- was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
Additional info:
Updated by Oleh Fedorenko about 5 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
- Difficulty set to medium
Updated by Oleh Fedorenko about 5 years ago
- Project changed from Hammer CLI to Katello
- Category changed from Other commands to Hammer
- Team Backlog deleted (
Hammer)
Updated by The Foreman Bot about 5 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/Katello/hammer-cli-katello/pull/709 added
Updated by Oleh Fedorenko about 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset hammer-cli-katello|63e9f595c14637597b1eb0a7c1a6c6943613cf09.
Updated by Jonathon Turel almost 5 years ago
- Target version set to Katello 3.15.0
Actions