From 61d8d9e0e35dc9759ec93b517b0a67df1c3506d3 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 18 Aug 2017 16:05:19 -0700 Subject: Bug: allow `leap test --continue` to run on additional nodes if there was an ssh error. closes #8811 --- lib/leap_cli/commands/test.rb | 2 +- lib/leap_cli/ssh/backend.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/leap_cli') diff --git a/lib/leap_cli/commands/test.rb b/lib/leap_cli/commands/test.rb index 70eb00fd..e2815aae 100644 --- a/lib/leap_cli/commands/test.rb +++ b/lib/leap_cli/commands/test.rb @@ -35,7 +35,7 @@ module LeapCli; module Commands SSH::remote_command(node, options) do |ssh, host| ssh.stream(test_cmd(options), :raise_error => true, :log_wrap => true) end - rescue LeapCli::SSH::ExecuteError + rescue LeapCli::SSH::TimeoutError, SSHKit::Runner::ExecuteError, SSHKit::Command::Failed if options[:continue] exit_status(1) else diff --git a/lib/leap_cli/ssh/backend.rb b/lib/leap_cli/ssh/backend.rb index 3894d815..599fc9a0 100644 --- a/lib/leap_cli/ssh/backend.rb +++ b/lib/leap_cli/ssh/backend.rb @@ -178,7 +178,7 @@ module LeapCli rescue StandardError => exc if exc.is_a?(SSHKit::Command::Failed) || exc.is_a?(SSHKit::Runner::ExecuteError) if @options[:raise_error] - raise LeapCli::SSH::ExecuteError, exc.to_s + raise exc elsif @options[:fail_msg] @logger.log(@options[:fail_msg], host: @host.hostname, :color => :red) else -- cgit v1.2.3