foreman_remote_execution 3.3.4 → 3.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/job_invocations_controller.rb +1 -0
- data/app/models/concerns/foreman_remote_execution/orchestration/ssh.rb +11 -4
- data/app/views/job_invocations/show.html.erb +6 -0
- data/app/views/job_invocations/show.js.erb +5 -0
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/test/models/orchestration/ssh_test.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6add16b63c650250f993954c92620863d9904055d4b175fa76b04b97dd70ee92
|
4
|
+
data.tar.gz: 7fca35b0b17e7f2ad0f5769fae4f56b0d5e6f0c85b9ebcc8abab29858bf585a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 359e21b88b85d45b1c4faef9a7e841b0c34e008d3e818c111eba4079167683ff6c59e1354f2f2aafc18e7be43c93c00c368eb9d331636d6c3103d6c59f637306
|
7
|
+
data.tar.gz: 17aa0693af9ec50fca1a97e4e685c914a665edfe78cf0d9a87b17a9c683490ad7b151748c36adb9b9bcb50389afaca533065d4590d23f2b7550eddad8017538c
|
@@ -15,9 +15,13 @@ module ForemanRemoteExecution
|
|
15
15
|
proxy = ::SmartProxy.find(proxy_id)
|
16
16
|
begin
|
17
17
|
proxy.drop_host_from_known_hosts(target)
|
18
|
-
rescue
|
19
|
-
|
20
|
-
|
18
|
+
rescue ::ProxyAPI::ProxyException => e
|
19
|
+
if e.wrapped_exception.is_a?(RestClient::NotFound)
|
20
|
+
# ignore 404 when known_hosts entry is missing or the module was not enabled
|
21
|
+
Foreman::Logging.exception "Proxy failed to delete SSH known_hosts for #{name}, #{ip}", e, :level => :error
|
22
|
+
else
|
23
|
+
raise e
|
24
|
+
end
|
21
25
|
rescue => e
|
22
26
|
Rails.logger.warn e.message
|
23
27
|
return false
|
@@ -29,7 +33,10 @@ module ForemanRemoteExecution
|
|
29
33
|
logger.debug "Scheduling SSH known_hosts cleanup"
|
30
34
|
|
31
35
|
host, _kind, _target = host_kind_target
|
32
|
-
|
36
|
+
# #remote_execution_proxies may not be defined on the host object in some case
|
37
|
+
# for example Host::Discovered does not have it defined, even though these hosts
|
38
|
+
# have Nic::Managed interfaces associated with them
|
39
|
+
proxies = (host.try(:remote_execution_proxies, 'SSH') || {}).values
|
33
40
|
proxies.flatten.uniq.each do |proxy|
|
34
41
|
queue.create(id: queue_id(proxy.id), name: _("Remove SSH known hosts for %s") % self,
|
35
42
|
priority: 200, action: [self, :drop_from_known_hosts, proxy.id])
|
@@ -41,3 +41,9 @@
|
|
41
41
|
<% end %>
|
42
42
|
<%= render_tab_content_for(:main_tabs, subject: @job_invocation) %>
|
43
43
|
</div>
|
44
|
+
|
45
|
+
<script id="job_invocation_refresh" data-refresh-url="<%= job_invocation_path(@job_invocation) %>">
|
46
|
+
<% if @auto_refresh %>
|
47
|
+
delayed_refresh($('script#job_invocation_refresh').data('refresh-url'), {});
|
48
|
+
<% end %>
|
49
|
+
</script>
|
@@ -30,7 +30,7 @@ class SSHOrchestrationTest < ActiveSupport::TestCase
|
|
30
30
|
|
31
31
|
it 'does not fail on 404 from the smart proxy' do
|
32
32
|
host.stubs(:skip_orchestration?).returns false
|
33
|
-
|
33
|
+
::ProxyAPI::RemoteExecutionSSH.any_instance.expects(:delete).raises(RestClient::ResourceNotFound).twice
|
34
34
|
host.build = true
|
35
35
|
host.save!
|
36
36
|
ids = ["ssh_remove_known_hosts_interface_#{interface.ip}_#{proxy.id}",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- app/views/job_invocations/new.html.erb
|
250
250
|
- app/views/job_invocations/refresh.js.erb
|
251
251
|
- app/views/job_invocations/show.html.erb
|
252
|
+
- app/views/job_invocations/show.js.erb
|
252
253
|
- app/views/job_invocations/show.json.erb
|
253
254
|
- app/views/job_invocations/welcome.html.erb
|
254
255
|
- app/views/job_templates/_custom_tab_headers.html.erb
|