foreman_remote_execution_core 1.4.4 → 1.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbe9c8dca2b75119ee1cd438a921c11404346a59b5e967b4e282a3ad51646699
4
- data.tar.gz: ed32bfa0d9f7a0324439cccaa834ae6d5da4be100ef9f537eac0db6d7dcd717e
3
+ metadata.gz: 465e9c409286d4bd5501a4e69ce110c449ef4ab4288ef401276231e3498feaad
4
+ data.tar.gz: 73bc72cbac7038f7356499f638e517f00ffb9396eb36c63c5751fb985958cd22
5
5
  SHA512:
6
- metadata.gz: 3de877ddc3fdbeed51b03164aee40920ccd977007053f995d8e7c8edd32990cd9d390c1049881a1eda46fb7e502dc7fb213a947e847aadf2b38bd24363aa15a6
7
- data.tar.gz: aaab475a03bfbfcd21e2cdc7a3c172b9e4bd13bb496fb79eabe18fa299e0e0b47c33ea1d72845d2291ec49399a71a092eaa06940ae097a71fa333c5f170d1d0e
6
+ metadata.gz: d7bd2eab26b331d80adb66481fa1e3d34b698fbdfab781000216f93e9c627b36f46ba8c614c8c6f286b92c6cd39db59448d524fb2ea159c4535e2a40fa44b786
7
+ data.tar.gz: 621b23721f0346fb4dcf9b70133174f7bf7c1c24d917f7f3bc8f0f8595d9814ff1a977888927e370b32c4674bf62313c91d48850b5523e18a6c5a65c98db5a94
@@ -105,6 +105,8 @@ module ForemanRemoteExecutionCore
105
105
  EXPECTED_POWER_ACTION_MESSAGES = ['restart host', 'shutdown host'].freeze
106
106
  DEFAULT_REFRESH_INTERVAL = 1
107
107
  MAX_PROCESS_RETRIES = 4
108
+ VERIFY_HOST_KEY = Gem::Version.create(Net::SSH::Version::STRING) < Gem::Version.create('5.0.0') ||
109
+ :accept_new_or_local_tunnel
108
110
 
109
111
  def initialize(options, user_method, suspended_action: nil)
110
112
  super suspended_action: suspended_action
@@ -155,7 +157,7 @@ module ForemanRemoteExecutionCore
155
157
  script = initialization_script
156
158
  logger.debug("executing script:\n#{indent_multiline(script)}")
157
159
  trigger(script)
158
- rescue => e
160
+ rescue StandardError, NotImplementedError => e
159
161
  logger.error("error while initalizing command #{e.class} #{e.message}:\n #{e.backtrace.join("\n")}")
160
162
  publish_exception('Error initializing command', e)
161
163
  end
@@ -278,7 +280,7 @@ module ForemanRemoteExecutionCore
278
280
  ssh_options[:keys_only] = true
279
281
  # if the host public key is contained in the known_hosts_file,
280
282
  # verify it, otherwise, if missing, import it and continue
281
- ssh_options[:paranoid] = true
283
+ ssh_options[:verify_host_key] = VERIFY_HOST_KEY
282
284
  ssh_options[:auth_methods] = available_authentication_methods
283
285
  ssh_options[:user_known_hosts_file] = prepare_known_hosts if @host_public_key
284
286
  ssh_options[:number_of_password_prompts] = 1
@@ -3,7 +3,7 @@ require 'open3'
3
3
  module ForemanRemoteExecutionCore
4
4
  module Utils
5
5
  class << self
6
- def prune_known_hosts(hostname, port, logger = Logger.new($stdout))
6
+ def prune_known_hosts!(hostname, port, logger = Logger.new($stdout))
7
7
  return if Net::SSH::KnownHosts.search_for(hostname).empty?
8
8
 
9
9
  target = if port == 22
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecutionCore
2
- VERSION = '1.4.4'.freeze
2
+ VERSION = '1.4.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt_pbkdf
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 4.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 4.2.0
69
69
  description: " Ssh remote execution provider code sharable between Foreman and Foreman-Proxy\n"
70
70
  email:
71
71
  - inecas@redhat.com