Description of problem: Running hammer auth login basic command remotely gives Error: No such device or address @ rb_sysopen - /dev/tty Version-Release number of selected component (if applicable): Satellite 6.7 snap 1 How reproducible: always Steps to Reproduce: 1. set use_session as true in hammer config 2. ssh root.com "hammer auth login basic --username=CqVvXhXCSf --password=ExZccFurXO" Actual results: Error: No such device or address @ rb_sysopen - /dev/tty Expected results: Should run successfully. Additional info: This is regression as the previous hammer auth login command was working fine if run remotely. Also this is automation blocker.
[ INFO 2019-11-19T08:15:34 HammerCLI::MainCommand] Called with options: {"option_debug"=>true} [ INFO 2019-11-19T08:15:34 HammerCLIForeman::Auth] Called with options: {} [ INFO 2019-11-19T08:15:34 HammerCLIForeman::Auth::LoginCommand] Called with options: {} [ INFO 2019-11-19T08:15:34 HammerCLIForeman::Auth::LoginCommand::Basic] Called with options: {"option_username"=>"CqVvXhXCSf", "option_password"=>"***"} [DEBUG 2019-11-19T08:15:34 SSLoptions] SSL options: { :ssl_ca_file => "/etc/pki/katello/certs/katello-server-ca.crt", :verify_ssl => true } [DEBUG 2019-11-19T08:15:34 API] Global headers: { :content_type => "application/json", :accept => "application/json;version=2", "Accept-Language" => "en" } [DEBUG 2019-11-19T08:15:34 API] Follow redirects: never [DEBUG 2019-11-19T08:15:34 Connection] Registered: foreman [DEBUG 2019-11-19T08:15:34 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_general_exception [ERROR 2019-11-19T08:15:34 Exception] Error: No such device or address @ rb_sysopen - /dev/tty Error: No such device or address @ rb_sysopen - /dev/tty [ERROR 2019-11-19T08:15:34 Exception] Errno::ENXIO (No such device or address @ rb_sysopen - /dev/tty): /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/lib/hammer_cli/utils.rb:86:in `sysopen' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/lib/hammer_cli/utils.rb:86:in `interactive_output' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.19.0/lib/hammer_cli_foreman/authenticate/login.rb:7:in `execute_with_params' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.19.0/lib/hammer_cli_foreman/auth.rb:20:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/lib/hammer_cli/abstract.rb:76:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/lib/hammer_cli/abstract.rb:76:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/lib/hammer_cli/abstract.rb:76:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/lib/hammer_cli/abstract.rb:76:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.0/bin/hammer:147:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>'
Created redmine issue https://projects.theforeman.org/issues/28318 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28318 has been resolved.
VERIFIED Version tested: Satellite 6.7 snap 4 # ssh root.com "hammer auth login basic --username=admin --password=changeme" Successfully logged in as 'admin'.
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://access.redhat.com/errata/RHBA-2020:1455