Project

General

Profile

Actions

Bug #37698

open

REX script provider failes to load with smart-proxy log level set to WARN

Added by Sebastian Bublitz 15 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Smart Proxy - SSH
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:

Description

When the loglevel in /etc/foreman-proxy/settings.yml is set to WARN (and probably also with UNKNOWN), the smart-proxy script feature fails to load.

The relevant error in the log is:

2024-07-30T08:41:23 [E] Couldn't enable 'script'
2024-07-30T08:41:23 [W] Error details for Couldn't enable 'script': <NoMethodError>: undefined method `last' for nil:NilClass
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.4/lib/smart_proxy_remote_execution_ssh.rb:89:in `block in validate_ssh_log_level!'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.4/lib/smart_proxy_remote_execution_ssh.rb:88:in `map'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.4/lib/smart_proxy_remote_execution_ssh.rb:88:in `validate_ssh_log_level!'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.4/lib/smart_proxy_remote_execution_ssh.rb:75:in `validate_ssh_settings!'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.4/lib/smart_proxy_remote_execution_ssh.rb:11:in `validate!'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.4/lib/smart_proxy_remote_execution_ssh/plugin.rb:48:in `block in <class:Plugin>'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:228:in `class_eval'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:228:in `configure_plugin'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:109:in `block in configure'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:109:in `each'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:109:in `configure'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:187:in `each'
/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:187:in `initialize_plugins'
/usr/share/foreman-proxy/lib/launcher.rb:129:in `launch'
/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'

How to reproduce:
  • Install a smart-proxy with the remote-execution-script feature
  • set log level to "WARN" in /etc/foreman-proxy/settings.yml
  • Restart the smart-proxy service
Expected outcome:

This was found with Remote Execution 12.0.5 and remote_execution_ssh 0.10.4, but looking at the code the relevant parts were not changed since then.

No data to display

Actions

Also available in: Atom PDF