vmpooler 0.14.9 → 0.16.3

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: c0eab66c5ff4591cc2863d674b1712e2e96048a66d2fd637984410b8b2d4cdfe
4
- data.tar.gz: 9c5a30016a4b4b4f671f83da7ed6bbce94d28079c974b9aae3b5d0016dc6ca1f
3
+ metadata.gz: 30fe7f5b64e7bd0311ba0bd442b59537b0f84e5917f3bab7e4bd59194666fd27
4
+ data.tar.gz: e62ca6fd7e50e224eb22da2ffbc16dc245ba68c2f4bf3253fc0efd876a19d8da
5
5
  SHA512:
6
- metadata.gz: 86e1712a09a8505f3a033421efe1870daf5212dc35f6b7b263b05fa7bb221abe3dd49d499dd5e322b5b96325ac5368929418cbdaaa6312497c2adc2a3fdb5b3e
7
- data.tar.gz: a8b78ca53a3779af36841cc545b48267fc8fd94dac970c9c3c655eae45caf36f4ec709f8c497040b683f86600d2b398ce081a8e580512e370404b828adc4246a
6
+ metadata.gz: 5d4396514a7ac21d826ca604654ebe52996f44193ef0fa59832668b0dd0721b13ec671ccd63ecd50359cbb8e958ce87da2f9b9c2f86efbb68d057bb19ff85a98
7
+ data.tar.gz: fe85f3d77e106c8dcc1802d8cbe6d59482fc4b486b9477a1ad175328093a5ec410b54c6621fc7fc287b5894f3ea7fe88e24d1c4c8332576198a9494ce8695a49
@@ -257,13 +257,10 @@ module Vmpooler
257
257
 
258
258
  c.add_span_processor(span_processor)
259
259
 
260
+ c.service_name = service_name
261
+ c.service_version = version
262
+
260
263
  c.resource = OpenTelemetry::Resource::Detectors::AutoDetector.detect
261
- c.resource = OpenTelemetry::SDK::Resources::Resource.create(
262
- {
263
- OpenTelemetry::SDK::Resources::Constants::SERVICE_RESOURCE[:name] => service_name,
264
- OpenTelemetry::SDK::Resources::Constants::SERVICE_RESOURCE[:version] => version
265
- }
266
- )
267
264
  end
268
265
  end
269
266
  end
@@ -3,7 +3,7 @@
3
3
  module Vmpooler
4
4
  class API < Sinatra::Base
5
5
  # Load API components
6
- %w[helpers dashboard reroute v1 request_logger].each do |lib|
6
+ %w[helpers dashboard reroute v1 request_logger healthcheck].each do |lib|
7
7
  require "vmpooler/api/#{lib}"
8
8
  end
9
9
  # Load dashboard components
@@ -40,6 +40,10 @@ module Vmpooler
40
40
  require 'prometheus/middleware/exporter'
41
41
  use Vmpooler::Metrics::Promstats::CollectorMiddleware, metrics_prefix: "#{metrics.prometheus_prefix}_http"
42
42
  use Prometheus::Middleware::Exporter, path: metrics.prometheus_endpoint
43
+ # Note that a user may want to use this check without prometheus
44
+ # However, prometheus setup includes the web server which is required for this check
45
+ # At this time prometheus is a requirement of using the health check on manager
46
+ use Vmpooler::API::Healthcheck
43
47
  end
44
48
 
45
49
  if torun.include? :api
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vmpooler
4
+ class API
5
+ class Healthcheck < Sinatra::Base
6
+ get '/healthcheck/?' do
7
+ content_type :json
8
+
9
+ status 200
10
+ JSON.pretty_generate({ 'ok' => true })
11
+ end
12
+ end
13
+ end
14
+ end
@@ -289,19 +289,15 @@ module Vmpooler
289
289
  move_vm_queue(pool, vm, 'running', 'completed', redis, "reached end of TTL after #{ttl} hours")
290
290
  throw :stop_checking
291
291
  end
292
+ else
293
+ move_vm_queue(pool, vm, 'running', 'completed', redis, 'is listed as running, but has no checkouttime data. Removing from running')
292
294
  end
293
295
 
294
- if provider.vm_ready?(pool, vm)
295
- throw :stop_checking
296
- else
297
- host = provider.get_vm(pool, vm)
296
+ throw :stop_checking if provider.vm_ready?(pool, vm)
298
297
 
299
- if host
300
- throw :stop_checking
301
- else
302
- move_vm_queue(pool, vm, 'running', 'completed', redis, 'is no longer in inventory, removing from running')
303
- end
304
- end
298
+ throw :stop_checking if provider.get_vm(pool, vm)
299
+
300
+ move_vm_queue(pool, vm, 'running', 'completed', redis, 'is no longer in inventory, removing from running')
305
301
  end
306
302
  end
307
303
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vmpooler
4
- VERSION = '0.14.9'
4
+ VERSION = '0.16.3'
5
5
  end
metadata CHANGED
@@ -1,315 +1,427 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmpooler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.9
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-21 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: pickup
14
+ name: concurrent-ruby
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.11
19
+ version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.11
26
+ version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
- name: puma
28
+ name: connection_pool
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.3'
33
+ version: '2.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.3'
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rack
42
+ name: net-ldap
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.2'
47
+ version: '0.16'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.2'
54
+ version: '0.16'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: nokogiri
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '13.0'
61
+ version: '1.10'
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: '13.0'
68
+ version: '1.10'
69
69
  - !ruby/object:Gem::Dependency
70
- name: redis
70
+ name: opentelemetry-api
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '4.1'
75
+ version: 0.7.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '4.1'
82
+ version: 0.7.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: rbvmomi
84
+ name: opentelemetry-exporter-jaeger
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '2.1'
90
- - - "<"
87
+ - - "~>"
91
88
  - !ruby/object:Gem::Version
92
- version: '4.0'
89
+ version: 0.7.0
93
90
  type: :runtime
94
91
  prerelease: false
95
92
  version_requirements: !ruby/object:Gem::Requirement
96
93
  requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: '2.1'
100
- - - "<"
94
+ - - "~>"
101
95
  - !ruby/object:Gem::Version
102
- version: '4.0'
96
+ version: 0.7.0
103
97
  - !ruby/object:Gem::Dependency
104
- name: sinatra
98
+ name: opentelemetry-instrumentation-concurrent_ruby
105
99
  requirement: !ruby/object:Gem::Requirement
106
100
  requirements:
107
101
  - - "~>"
108
102
  - !ruby/object:Gem::Version
109
- version: '2.0'
103
+ version: 0.7.0
110
104
  type: :runtime
111
105
  prerelease: false
112
106
  version_requirements: !ruby/object:Gem::Requirement
113
107
  requirements:
114
108
  - - "~>"
115
109
  - !ruby/object:Gem::Version
116
- version: '2.0'
110
+ version: 0.7.0
117
111
  - !ruby/object:Gem::Dependency
118
- name: prometheus-client
112
+ name: opentelemetry-instrumentation-redis
119
113
  requirement: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '2.0'
117
+ version: 0.7.0
124
118
  type: :runtime
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '2.0'
124
+ version: 0.7.0
131
125
  - !ruby/object:Gem::Dependency
132
- name: net-ldap
126
+ name: opentelemetry-instrumentation-sinatra
133
127
  requirement: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - "~>"
136
130
  - !ruby/object:Gem::Version
137
- version: '0.16'
131
+ version: 0.7.1
138
132
  type: :runtime
139
133
  prerelease: false
140
134
  version_requirements: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - "~>"
143
137
  - !ruby/object:Gem::Version
144
- version: '0.16'
138
+ version: 0.7.1
145
139
  - !ruby/object:Gem::Dependency
146
- name: statsd-ruby
140
+ name: opentelemetry-resource_detectors
147
141
  requirement: !ruby/object:Gem::Requirement
148
142
  requirements:
149
143
  - - "~>"
150
144
  - !ruby/object:Gem::Version
151
- version: '1.4'
145
+ version: 0.7.0
152
146
  type: :runtime
153
147
  prerelease: false
154
148
  version_requirements: !ruby/object:Gem::Requirement
155
149
  requirements:
156
150
  - - "~>"
157
151
  - !ruby/object:Gem::Version
158
- version: '1.4'
152
+ version: 0.7.0
159
153
  - !ruby/object:Gem::Dependency
160
- name: connection_pool
154
+ name: opentelemetry-sdk
161
155
  requirement: !ruby/object:Gem::Requirement
162
156
  requirements:
163
157
  - - "~>"
164
158
  - !ruby/object:Gem::Version
165
- version: '2.2'
159
+ version: 0.7.0
166
160
  type: :runtime
167
161
  prerelease: false
168
162
  version_requirements: !ruby/object:Gem::Requirement
169
163
  requirements:
170
164
  - - "~>"
171
165
  - !ruby/object:Gem::Version
172
- version: '2.2'
166
+ version: 0.7.0
173
167
  - !ruby/object:Gem::Dependency
174
- name: concurrent-ruby
168
+ name: pickup
175
169
  requirement: !ruby/object:Gem::Requirement
176
170
  requirements:
177
171
  - - "~>"
178
172
  - !ruby/object:Gem::Version
179
- version: '1.1'
173
+ version: 0.0.11
180
174
  type: :runtime
181
175
  prerelease: false
182
176
  version_requirements: !ruby/object:Gem::Requirement
183
177
  requirements:
184
178
  - - "~>"
185
179
  - !ruby/object:Gem::Version
186
- version: '1.1'
180
+ version: 0.0.11
187
181
  - !ruby/object:Gem::Dependency
188
- name: nokogiri
182
+ name: prometheus-client
189
183
  requirement: !ruby/object:Gem::Requirement
190
184
  requirements:
191
185
  - - "~>"
192
186
  - !ruby/object:Gem::Version
193
- version: '1.10'
187
+ version: '2.0'
194
188
  type: :runtime
195
189
  prerelease: false
196
190
  version_requirements: !ruby/object:Gem::Requirement
197
191
  requirements:
198
192
  - - "~>"
199
193
  - !ruby/object:Gem::Version
200
- version: '1.10'
194
+ version: '2.0'
201
195
  - !ruby/object:Gem::Dependency
202
- name: spicy-proton
196
+ name: puma
203
197
  requirement: !ruby/object:Gem::Requirement
204
198
  requirements:
205
199
  - - "~>"
206
200
  - !ruby/object:Gem::Version
207
- version: '2.1'
201
+ version: '4.3'
208
202
  type: :runtime
209
203
  prerelease: false
210
204
  version_requirements: !ruby/object:Gem::Requirement
211
205
  requirements:
212
206
  - - "~>"
213
207
  - !ruby/object:Gem::Version
214
- version: '2.1'
208
+ version: '4.3'
215
209
  - !ruby/object:Gem::Dependency
216
- name: opentelemetry-api
210
+ name: rack
217
211
  requirement: !ruby/object:Gem::Requirement
218
212
  requirements:
219
213
  - - "~>"
220
214
  - !ruby/object:Gem::Version
221
- version: 0.6.0
215
+ version: '2.2'
222
216
  type: :runtime
223
217
  prerelease: false
224
218
  version_requirements: !ruby/object:Gem::Requirement
225
219
  requirements:
226
220
  - - "~>"
227
221
  - !ruby/object:Gem::Version
228
- version: 0.6.0
222
+ version: '2.2'
229
223
  - !ruby/object:Gem::Dependency
230
- name: opentelemetry-exporter-jaeger
224
+ name: rake
231
225
  requirement: !ruby/object:Gem::Requirement
232
226
  requirements:
233
227
  - - "~>"
234
228
  - !ruby/object:Gem::Version
235
- version: 0.6.0
229
+ version: '13.0'
236
230
  type: :runtime
237
231
  prerelease: false
238
232
  version_requirements: !ruby/object:Gem::Requirement
239
233
  requirements:
240
234
  - - "~>"
241
235
  - !ruby/object:Gem::Version
242
- version: 0.6.0
236
+ version: '13.0'
243
237
  - !ruby/object:Gem::Dependency
244
- name: opentelemetry-instrumentation-concurrent_ruby
238
+ name: rbvmomi
245
239
  requirement: !ruby/object:Gem::Requirement
246
240
  requirements:
247
- - - "~>"
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '2.1'
244
+ - - "<"
248
245
  - !ruby/object:Gem::Version
249
- version: 0.6.0
246
+ version: '4.0'
250
247
  type: :runtime
251
248
  prerelease: false
252
249
  version_requirements: !ruby/object:Gem::Requirement
253
250
  requirements:
254
- - - "~>"
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ version: '2.1'
254
+ - - "<"
255
255
  - !ruby/object:Gem::Version
256
- version: 0.6.0
256
+ version: '4.0'
257
257
  - !ruby/object:Gem::Dependency
258
- name: opentelemetry-instrumentation-redis
258
+ name: redis
259
259
  requirement: !ruby/object:Gem::Requirement
260
260
  requirements:
261
261
  - - "~>"
262
262
  - !ruby/object:Gem::Version
263
- version: 0.6.0
263
+ version: '4.1'
264
264
  type: :runtime
265
265
  prerelease: false
266
266
  version_requirements: !ruby/object:Gem::Requirement
267
267
  requirements:
268
268
  - - "~>"
269
269
  - !ruby/object:Gem::Version
270
- version: 0.6.0
270
+ version: '4.1'
271
271
  - !ruby/object:Gem::Dependency
272
- name: opentelemetry-instrumentation-sinatra
272
+ name: sinatra
273
273
  requirement: !ruby/object:Gem::Requirement
274
274
  requirements:
275
275
  - - "~>"
276
276
  - !ruby/object:Gem::Version
277
- version: 0.6.0
277
+ version: '2.0'
278
278
  type: :runtime
279
279
  prerelease: false
280
280
  version_requirements: !ruby/object:Gem::Requirement
281
281
  requirements:
282
282
  - - "~>"
283
283
  - !ruby/object:Gem::Version
284
- version: 0.6.0
284
+ version: '2.0'
285
285
  - !ruby/object:Gem::Dependency
286
- name: opentelemetry-resource_detectors
286
+ name: spicy-proton
287
287
  requirement: !ruby/object:Gem::Requirement
288
288
  requirements:
289
289
  - - "~>"
290
290
  - !ruby/object:Gem::Version
291
- version: 0.6.0
291
+ version: '2.1'
292
292
  type: :runtime
293
293
  prerelease: false
294
294
  version_requirements: !ruby/object:Gem::Requirement
295
295
  requirements:
296
296
  - - "~>"
297
297
  - !ruby/object:Gem::Version
298
- version: 0.6.0
298
+ version: '2.1'
299
299
  - !ruby/object:Gem::Dependency
300
- name: opentelemetry-sdk
300
+ name: statsd-ruby
301
301
  requirement: !ruby/object:Gem::Requirement
302
302
  requirements:
303
303
  - - "~>"
304
304
  - !ruby/object:Gem::Version
305
- version: 0.6.0
305
+ version: '1.4'
306
306
  type: :runtime
307
307
  prerelease: false
308
308
  version_requirements: !ruby/object:Gem::Requirement
309
309
  requirements:
310
310
  - - "~>"
311
311
  - !ruby/object:Gem::Version
312
- version: 0.6.0
312
+ version: '1.4'
313
+ - !ruby/object:Gem::Dependency
314
+ name: climate_control
315
+ requirement: !ruby/object:Gem::Requirement
316
+ requirements:
317
+ - - ">="
318
+ - !ruby/object:Gem::Version
319
+ version: 0.2.0
320
+ type: :development
321
+ prerelease: false
322
+ version_requirements: !ruby/object:Gem::Requirement
323
+ requirements:
324
+ - - ">="
325
+ - !ruby/object:Gem::Version
326
+ version: 0.2.0
327
+ - !ruby/object:Gem::Dependency
328
+ name: mock_redis
329
+ requirement: !ruby/object:Gem::Requirement
330
+ requirements:
331
+ - - ">="
332
+ - !ruby/object:Gem::Version
333
+ version: 0.17.0
334
+ type: :development
335
+ prerelease: false
336
+ version_requirements: !ruby/object:Gem::Requirement
337
+ requirements:
338
+ - - ">="
339
+ - !ruby/object:Gem::Version
340
+ version: 0.17.0
341
+ - !ruby/object:Gem::Dependency
342
+ name: pry
343
+ requirement: !ruby/object:Gem::Requirement
344
+ requirements:
345
+ - - ">="
346
+ - !ruby/object:Gem::Version
347
+ version: '0'
348
+ type: :development
349
+ prerelease: false
350
+ version_requirements: !ruby/object:Gem::Requirement
351
+ requirements:
352
+ - - ">="
353
+ - !ruby/object:Gem::Version
354
+ version: '0'
355
+ - !ruby/object:Gem::Dependency
356
+ name: rack-test
357
+ requirement: !ruby/object:Gem::Requirement
358
+ requirements:
359
+ - - ">="
360
+ - !ruby/object:Gem::Version
361
+ version: '0.6'
362
+ type: :development
363
+ prerelease: false
364
+ version_requirements: !ruby/object:Gem::Requirement
365
+ requirements:
366
+ - - ">="
367
+ - !ruby/object:Gem::Version
368
+ version: '0.6'
369
+ - !ruby/object:Gem::Dependency
370
+ name: rspec
371
+ requirement: !ruby/object:Gem::Requirement
372
+ requirements:
373
+ - - ">="
374
+ - !ruby/object:Gem::Version
375
+ version: '3.2'
376
+ type: :development
377
+ prerelease: false
378
+ version_requirements: !ruby/object:Gem::Requirement
379
+ requirements:
380
+ - - ">="
381
+ - !ruby/object:Gem::Version
382
+ version: '3.2'
383
+ - !ruby/object:Gem::Dependency
384
+ name: rubocop
385
+ requirement: !ruby/object:Gem::Requirement
386
+ requirements:
387
+ - - ">="
388
+ - !ruby/object:Gem::Version
389
+ version: '0'
390
+ type: :development
391
+ prerelease: false
392
+ version_requirements: !ruby/object:Gem::Requirement
393
+ requirements:
394
+ - - ">="
395
+ - !ruby/object:Gem::Version
396
+ version: '0'
397
+ - !ruby/object:Gem::Dependency
398
+ name: simplecov
399
+ requirement: !ruby/object:Gem::Requirement
400
+ requirements:
401
+ - - ">="
402
+ - !ruby/object:Gem::Version
403
+ version: 0.11.2
404
+ type: :development
405
+ prerelease: false
406
+ version_requirements: !ruby/object:Gem::Requirement
407
+ requirements:
408
+ - - ">="
409
+ - !ruby/object:Gem::Version
410
+ version: 0.11.2
411
+ - !ruby/object:Gem::Dependency
412
+ name: yarjuf
413
+ requirement: !ruby/object:Gem::Requirement
414
+ requirements:
415
+ - - ">="
416
+ - !ruby/object:Gem::Version
417
+ version: '2.0'
418
+ type: :development
419
+ prerelease: false
420
+ version_requirements: !ruby/object:Gem::Requirement
421
+ requirements:
422
+ - - ">="
423
+ - !ruby/object:Gem::Version
424
+ version: '2.0'
313
425
  description:
314
426
  email:
315
427
  - support@puppet.com
@@ -322,6 +434,7 @@ files:
322
434
  - lib/vmpooler.rb
323
435
  - lib/vmpooler/api.rb
324
436
  - lib/vmpooler/api/dashboard.rb
437
+ - lib/vmpooler/api/healthcheck.rb
325
438
  - lib/vmpooler/api/helpers.rb
326
439
  - lib/vmpooler/api/request_logger.rb
327
440
  - lib/vmpooler/api/reroute.rb