Actions
Bug #19159
closedSession authentication doesn't work with Restclient < 1.8
Status:
Closed
Priority:
High
Assignee:
Category:
Other commands
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Description
Session authentication doesn't work with restclient 1.8 that we use on production installs.
The authenticator expects http request to have uri set but this change was introduced post 1.8.
[DEBUG 2017-04-04 07:17:49 API] Using authenticator: HammerCLIForeman::Api::SessionAuthenticatorWrapper [ERROR 2017-04-04 07:17:49 API] undefined method `hostname' for nil:NilClass [DEBUG 2017-04-04 07:17:49 API] #<NoMethodError: undefined method `hostname' for nil:NilClass> [ERROR 2017-04-04 07:17:49 Exception] Error: undefined method `hostname' for nil:NilClass Error: undefined method `hostname' for nil:NilClass [ERROR 2017-04-04 07:17:49 Exception] NoMethodError (undefined method `hostname' for nil:NilClass): /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.0/lib/hammer_cli_foreman/api/session_authenticator_wrapper.rb:40:in `authenticate' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.1.0/lib/apipie_bindings/rest_client_extensions.rb:14:in `block in <module:RestClientExtensions>' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:407:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:407:in `block in transmit' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:406:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:406:in `transmit' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:51:in `get' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.1.0/lib/apipie_bindings/api.rb:313:in `call_client' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.1.0/lib/apipie_bindings/api.rb:229:in `http_call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.1.0/lib/apipie_bindings/api.rb:179:in `call_action' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.1.0/lib/apipie_bindings/api.rb:174:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.1.0/lib/apipie_bindings/resource.rb:21:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.0/lib/hammer_cli/apipie/command.rb:43:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.0/lib/hammer_cli_foreman/commands.rb:158:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.0/lib/hammer_cli_foreman/commands.rb:248:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.0/lib/hammer_cli_foreman/commands.rb:283:in `retrieve_all' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.0/lib/hammer_cli_foreman/commands.rb:267:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.0/lib/hammer_cli/abstract.rb:27:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.0/lib/hammer_cli/abstract.rb:27:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.0/lib/hammer_cli/abstract.rb:27:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.0/bin/hammer:146:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>'
Actions