hive-runner 2.1.22 → 2.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/hive_setup +1 -0
- data/lib/hive/execution_script.rb +2 -3
- data/lib/hive/log.rb +2 -2
- data/lib/hive/register.rb +1 -1
- data/lib/hive/worker.rb +16 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 334ad5a3c278a9cba01ae2ecc59ba974c5630210
|
4
|
+
data.tar.gz: 9d8ab4d1c69a7834f2091351c184848c58f9ef13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3034646eef1aee0aabfdbe406865780543dcc6551a139f5ac3f3eae0feb4d8727187685f154b2b4241c1a8103edfa2828926cedd887bd541d612a0d1308dae0
|
7
|
+
data.tar.gz: 579dd5b3c4f4007e5a9ce6aa463359d4dbf8da1d05de225379ea394fef677696617f10e3174deaf686655f32d4eb52a019e04b8eb68ca13663c821ac788803b6
|
data/bin/hive_setup
CHANGED
@@ -97,10 +97,9 @@ module Hive
|
|
97
97
|
rescue Timeout::Error
|
98
98
|
@log.debug("Sub-process keep_running check")
|
99
99
|
if ! ( @keep_running.nil? || @keep_running.call )
|
100
|
-
|
101
|
-
|
100
|
+
Process.kill(-9, @pgid)
|
101
|
+
raise "Script terminated. Check worker logs for more details"
|
102
102
|
end
|
103
|
-
|
104
103
|
# TODO Upload in-progress script logs
|
105
104
|
end
|
106
105
|
end
|
data/lib/hive/log.rb
CHANGED
@@ -82,9 +82,9 @@ module Hive
|
|
82
82
|
|
83
83
|
# Currently this will clear the Hive Mind log but do nothing to the local
|
84
84
|
# files
|
85
|
-
def clear(
|
85
|
+
def clear(options)
|
86
86
|
if self.hive_mind
|
87
|
-
self.hive_mind.clear_state component:
|
87
|
+
self.hive_mind.clear_state(component: options[:component], level: options[:level])
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
data/lib/hive/register.rb
CHANGED
@@ -52,7 +52,7 @@ module Hive
|
|
52
52
|
|
53
53
|
# For the moment, clear Hive Mind logs each time
|
54
54
|
# TODO Something better so that warnings and errors are not hidden
|
55
|
-
Hive.logger.clear
|
55
|
+
Hive.logger.clear({component: Hive.logger.default_progname, level: Hive.config.logging.hm_logs_to_delete})
|
56
56
|
Hive.logger.debug('Hive Mind log cleared')
|
57
57
|
end
|
58
58
|
end
|
data/lib/hive/worker.rb
CHANGED
@@ -71,7 +71,7 @@ module Hive
|
|
71
71
|
@log.info('Starting worker')
|
72
72
|
while keep_worker_running?
|
73
73
|
begin
|
74
|
-
@log.clear
|
74
|
+
@log.clear({component: @default_component, level: Hive.config.logging.hm_logs_to_delete})
|
75
75
|
update_queues
|
76
76
|
poll_queue if diagnostics
|
77
77
|
rescue DeviceNotReady => e
|
@@ -148,7 +148,6 @@ module Hive
|
|
148
148
|
|
149
149
|
@log.info('Job starting')
|
150
150
|
@job.prepare(@hive_mind.id)
|
151
|
-
|
152
151
|
exception = nil
|
153
152
|
begin
|
154
153
|
@log.info "Setting job paths"
|
@@ -188,11 +187,11 @@ module Hive
|
|
188
187
|
@script.append_bash_cmd @job.command
|
189
188
|
|
190
189
|
set_job_state_to :running
|
191
|
-
@job.start
|
192
190
|
|
193
191
|
@log.info "Pre-execution setup"
|
194
192
|
pre_script(@job, @file_system, @script)
|
195
193
|
|
194
|
+
@job.start
|
196
195
|
@log.info "Running execution script"
|
197
196
|
exit_value = @script.run
|
198
197
|
@job.end(exit_value)
|
@@ -207,7 +206,6 @@ module Hive
|
|
207
206
|
|
208
207
|
# Upload results
|
209
208
|
@file_system.finalise_results_directory
|
210
|
-
upload_files(@job, @file_system.results_path, @file_system.logs_path)
|
211
209
|
upload_results(@job, "#{@file_system.testbed_path}/#{@job.execution_directory}", @file_system.results_path)
|
212
210
|
rescue => e
|
213
211
|
@log.error( "Post execution failed: " + e.message)
|
@@ -217,9 +215,19 @@ module Hive
|
|
217
215
|
if exception
|
218
216
|
@job.error( exception.message )
|
219
217
|
set_job_state_to :completed
|
218
|
+
begin
|
219
|
+
upload_files(@job, @file_system.results_path, @file_system.logs_path)
|
220
|
+
rescue => e
|
221
|
+
@log.error("Exception while uploading files: #{e.backtrace.join("\n : ")}")
|
222
|
+
end
|
220
223
|
raise exception
|
221
224
|
else
|
222
225
|
@job.complete
|
226
|
+
begin
|
227
|
+
upload_files(@job, @file_system.results_path, @file_system.logs_path)
|
228
|
+
rescue => e
|
229
|
+
@log.error("Exception while uploading files: #{e.backtrace.join("\n : ")}")
|
230
|
+
end
|
223
231
|
end
|
224
232
|
|
225
233
|
Signal.trap('TERM') do
|
@@ -316,7 +324,10 @@ module Hive
|
|
316
324
|
config_file: conf_file,
|
317
325
|
hive_job_id: job.job_id,
|
318
326
|
version: job.execution_variables.version,
|
319
|
-
target: job.execution_variables.queue_name
|
327
|
+
target: job.execution_variables.queue_name,
|
328
|
+
cert: Chamber.env.network.cert,
|
329
|
+
cacert: Chamber.env.network.cafile,
|
330
|
+
ssl_verify_mode: Chamber.env.network.verify_mode
|
320
331
|
)
|
321
332
|
end
|
322
333
|
rescue => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hive-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Haig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chamber
|