Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions lib/smart_proxy_remote_execution_ssh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ def validate_mode!
unless Plugin::MODES.include? Plugin.settings.mode
raise "Mode has to be one of #{Plugin::MODES.join(', ')}, given #{Plugin.settings.mode}"
end

if Plugin.settings.async_ssh
Plugin.logger.warn('Option async_ssh is deprecated, use ssh-async mode instead.')

case Plugin.settings.mode
when :ssh
Plugin.logger.warn('Deprecated option async_ssh used together with ssh mode, switching mode to ssh-async.')
Plugin.settings.mode = :'ssh-async'
when :'ssh-async'
# This is a noop
else
Plugin.logger.warn('Deprecated option async_ssh used together with incompatible mode, ignoring.')
end
end
end

def validate_mqtt_settings!
Expand Down Expand Up @@ -97,11 +83,11 @@ def validate_ssh_log_level!
end

def requires_configured_ssh?
%i[ssh ssh-async].include?(Plugin.settings.mode) || Plugin.settings.cockpit_integration
Plugin.settings.mode == :ssh || Plugin.settings.cockpit_integration
end

def validate_socket_path!
return unless Plugin.settings.mode == :'ssh' || Plugin.settings.mode == :'ssh-async'
return unless Plugin.settings.mode == :'ssh'

socket_path = File.expand_path(Plugin.settings.socket_working_dir)
raise "Socket path #{socket_path} is too long" if socket_path.length > Plugin::SOCKET_PATH_MAX_LENGTH
Expand Down
2 changes: 1 addition & 1 deletion lib/smart_proxy_remote_execution_ssh/actions/run_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RunScript < ::Dynflow::Action
def plan(*args)
mode = Proxy::RemoteExecution::Ssh::Plugin.settings.mode
case mode
when :ssh, :'ssh-async'
when :ssh
plan_action(ScriptRunner, *args)
when :pull, :'pull-mqtt'
plan_action(PullScript, *args)
Expand Down
110 changes: 0 additions & 110 deletions lib/smart_proxy_remote_execution_ssh/async_scripts/control.sh

This file was deleted.

151 changes: 0 additions & 151 deletions lib/smart_proxy_remote_execution_ssh/async_scripts/retrieve.sh

This file was deleted.

4 changes: 1 addition & 3 deletions lib/smart_proxy_remote_execution_ssh/plugin.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Proxy::RemoteExecution::Ssh
class Plugin < Proxy::Plugin
SSH_LOG_LEVELS = %w[debug info error fatal].freeze
MODES = %i[ssh ssh-async pull pull-mqtt].freeze
MODES = %i[ssh pull pull-mqtt].freeze
# Unix domain socket path length is limited to 104 (on some platforms) characters
# Socket path is composed of custom path (max 49 characters) + job id (37 characters)
# + offset(17 characters) + null terminator
Expand Down Expand Up @@ -61,8 +61,6 @@ def self.simulate?
def self.runner_class
@runner_class ||= if simulate?
Runners::FakeScriptRunner
elsif settings.mode == :'ssh-async'
Runners::PollingScriptRunner
else
Runners::ScriptRunner
end
Expand Down
1 change: 0 additions & 1 deletion lib/smart_proxy_remote_execution_ssh/runners.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Proxy::RemoteExecution::Ssh
module Runners
require 'smart_proxy_remote_execution_ssh/runners/script_runner'
require 'smart_proxy_remote_execution_ssh/runners/polling_script_runner'
require 'smart_proxy_remote_execution_ssh/runners/fake_script_runner'
end
end
Loading