Bug #16991

No way to enable remote execution SSH debug logging easily

Added by Adam Ruzicka over 1 year ago. Updated 2 months ago.

Assigned To:Adam Ruzicka
Target version:Foreman - Team Ivan Iteration 22
Difficulty: Pull request:https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/35, https://github.com/theforeman/foreman_remote_execution/pull/290
Bugzilla link:1362630
Story points-
Velocity based estimate-


Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1362630

Description of problem:
Net::SSH is able to have quite detailed logging, but we don't give the user a way to see it - options[:logger] seems empty, so it goes to STDERR. We don't set the verbosity options either, maybe try to keep that the same as proxy's.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Look in /var/log/foreman-proxy/*

Actual results:
No ssh logs

Expected results:
See ssh logs

Additional info:

Manual way to view the logs:

1. Enable debug logging by editing /opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_remote_execution_ssh_core-*/lib/smart_proxy_remote_execution_ssh_core/connector.rb

Line 133 change Net::SSH.start(@host, @user, ssh_options) to Net::SSH.start(@host, @user, ssh_options.merge(:verbose => :debug))

2. Stop smart_proxy_dynflow_core

3. Start as foreman-proxy user in interaactive mode:

sudo -u foreman-proxy /usr/bin/smart_proxy_dynflow_core -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid

SSH log messages will show on STDERR

Associated revisions

Revision 83d7ea11
Added by Adam Růžička 3 months ago

Fixes #16991 - Allow setting ssh log level

Revision e6d93b9a
Added by Adam Ruzicka 2 months ago

Fixes #16991 - Allow setting ssh log level

Revision c6d799c8
Added by Adam Ruzicka 2 months ago

Fixes #16991 - Mention general log level relation


#1 Updated by Adam Ruzicka over 1 year ago

  • Target version set to Team Ivan backlog

#2 Updated by The Foreman Bot 7 months ago

  • Assigned To set to Adam Ruzicka
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/290 added

#3 Updated by The Foreman Bot 7 months ago

  • Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/35 added

#4 Updated by Adam Ruzicka 7 months ago

  • Target version changed from Team Ivan backlog to Team Ivan Iteration 22

#5 Updated by Anonymous 3 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF