foreman-tasks 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmZhMjBlOGVlMDU5NDI1NjNhZWRhNDM3Mjk5MzM3NTdhOTI4ZWE2MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmFkYzY1MzcxOTZiNTgxMzUyNjAxZTI4ZDYyOWI2N2FlOGVmMzA5Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzIwNTJlMmY5MGVmNWY4OWM2MWMwNjFhODkzZjkzZTFmMDZlYjcyMjI1YjIz
|
10
|
+
YzQ2ZjE0YTFlZDgzYTM4MjQ5Njk5ZmJjZmU5ZTJhY2Y0Y2E3M2M2NDFkOTdl
|
11
|
+
ZTQ5N2ZhMTg4MTA1YWQ3OTIyMjFlY2I1MjgxMDBiNjQ1NWQxNzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTI2YjJjYzc4NzUwZjA1YWIzMzNlZDIxNTk0OTFiZGU5NDZkYzQzNjgyNjE3
|
14
|
+
MGVkODE5ODdjMDhmODlmYWQ5YzI3MGU2ZjZmYzM2NjE2NGYyODA3N2FhNDkx
|
15
|
+
NDRkZGNlNzJhNTE5YzczMDIyYjBhOGU5OGY2NjkwZGFjYzA4ZTg=
|
@@ -55,14 +55,14 @@ module Actions
|
|
55
55
|
def check_task_status
|
56
56
|
if output[:proxy_task_id]
|
57
57
|
response = proxy.status_of_task(output[:proxy_task_id])
|
58
|
-
if response['state']
|
58
|
+
if %w(stopped paused).include? response['state']
|
59
59
|
if response['result'] == 'error'
|
60
60
|
raise ::Foreman::Exception, _("The smart proxy task '#{output[:proxy_task_id]}' failed.")
|
61
61
|
else
|
62
62
|
on_data(response['actions'].find { |block_action| block_action['class'] == proxy_action_name }['output'])
|
63
63
|
end
|
64
64
|
else
|
65
|
-
|
65
|
+
suspend
|
66
66
|
end
|
67
67
|
else
|
68
68
|
process_timeout
|
@@ -129,7 +129,9 @@ module Actions
|
|
129
129
|
def default_connection_options
|
130
130
|
# Fails if the plan is not finished within 60 seconds from the first task trigger attempt on the smart proxy
|
131
131
|
# If the triggering fails, it retries 3 more times with 15 second delays
|
132
|
-
{ :retry_interval =>
|
132
|
+
{ :retry_interval => Setting['foreman_tasks_proxy_action_retry_interval'] || 15,
|
133
|
+
:retry_count => Setting['foreman_tasks_proxy_action_retry_count' ] || 4,
|
134
|
+
:timeout => Setting['foreman_tasks_proxy_action_start_timeout'] || 60 }
|
133
135
|
end
|
134
136
|
|
135
137
|
private
|
@@ -30,6 +30,10 @@ module ProxyAPI
|
|
30
30
|
def status_of_task(proxy_task_id)
|
31
31
|
MultiJson.load(Task.new(@args).send(:get, "#{ proxy_task_id }/status"))
|
32
32
|
end
|
33
|
+
|
34
|
+
def tasks_count(state)
|
35
|
+
MultiJson.load(Task.new(@args).send(:get, "count?state=#{state}"))['count'].to_i
|
36
|
+
end
|
33
37
|
end
|
34
38
|
end
|
35
39
|
end
|
@@ -8,7 +8,10 @@ class Setting::ForemanTasks < Setting
|
|
8
8
|
[
|
9
9
|
self.set('dynflow_allow_dangerous_actions', N_("Allow unlocking actions which can have dangerous consequences."), false),
|
10
10
|
self.set('dynflow_enable_console', N_("Enable the dynflow console (/foreman_tasks/dynflow) for debugging"), true),
|
11
|
-
self.set('dynflow_console_require_auth', N_("Require user to be authenticated as user with admin rights when accessing dynflow console"), true)
|
11
|
+
self.set('dynflow_console_require_auth', N_("Require user to be authenticated as user with admin rights when accessing dynflow console"), true),
|
12
|
+
self.set('foreman_tasks_proxy_action_retry_count', N_("Number of attempts to start a task on the smart proxy before failing"), 4),
|
13
|
+
self.set('foreman_tasks_proxy_action_retry_interval', N_("Time in seconds between retries"), 15),
|
14
|
+
self.set('foreman_tasks_proxy_action_start_timeout', N_("Time in second during which a task has to be started on the proxy"), 60)
|
12
15
|
].each { |s| self.create! s.update(:category => "Setting::ForemanTasks")}
|
13
16
|
end
|
14
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
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: 2015-09-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynflow
|