vmpooler 0.15.0 → 0.17.0

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: 3de9ebbf95a02da2f09185cdea291c73676c5dc853c998beaae4dc13938eed0d
4
- data.tar.gz: 1d2aae318e3c854de414aaef11e8582a86d498c207cfb644424234e93787614d
3
+ metadata.gz: 0c5757a10068283879b2db59f56ac980d4b5f23b171baf35d555f032432ac81a
4
+ data.tar.gz: 31cd71e044d92d9e64096b7baa589061f3c0e3561b8c390ca6263856430bc516
5
5
  SHA512:
6
- metadata.gz: e17293ccb997288e7a9802709a1b770f2ed71dee527fc6d3fc53da45dc520579ce6d80332de2b732f041ea0aaa69d5392c8329d2c73f38152507fe1b87428c05
7
- data.tar.gz: 2a1020d1534da9fece3b701d429eca863ddbbc46511f5691e4c1db0304d0bc2de4ce10adb36dea13442c62ac81cebb0b780be4ce1f3706386186f86d800443bc
6
+ metadata.gz: adb0aa6d88d35add538e12ee15636afa1eaea94018d4b5a2086c38b3f2b104311420e1cbed0118312cec369f007ef5917d99bec51b836afa789d2e98fbd237bc
7
+ data.tar.gz: 971ab95fccf7b541381b9060f2d4eea27bc17c74f4f2880f24ac7a7d26f85658cdf96e435aec64c6427446edaf172cdf6de9bff719b4816ac3e81cd87fd261c2
@@ -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
@@ -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
@@ -306,19 +306,26 @@ module Vmpooler
306
306
 
307
307
  template_vm_object = find_template_vm(pool, connection)
308
308
 
309
+ extra_config = [
310
+ { key: 'guestinfo.hostname', value: new_vmname }
311
+ ]
312
+
313
+ if pool.key?('snapshot_mainMem_ioBlockPages')
314
+ ioblockpages = pool['snapshot_mainMem_ioBlockPages']
315
+ extra_config.push(
316
+ { key: 'mainMem.ioBlockPages', value: ioblockpages }
317
+ )
318
+ end
319
+ if pool.key?('snapshot_mainMem_iowait')
320
+ iowait = pool['snapshot_mainMem_iowait']
321
+ extra_config.push(
322
+ { key: 'mainMem.iowait', value: iowait }
323
+ )
324
+ end
325
+
309
326
  # Annotate with creation time, origin template, etc.
310
327
  # Add extraconfig options that can be queried by vmtools
311
- config_spec = RbVmomi::VIM.VirtualMachineConfigSpec(
312
- annotation: JSON.pretty_generate(
313
- name: new_vmname,
314
- created_by: provider_config['username'],
315
- base_template: template_path,
316
- creation_timestamp: Time.now.utc
317
- ),
318
- extraConfig: [
319
- { key: 'guestinfo.hostname', value: new_vmname }
320
- ]
321
- )
328
+ config_spec = create_config_spec(new_vmname, template_path, extra_config)
322
329
 
323
330
  # Check if alternate network configuration is specified and add configuration
324
331
  if pool.key?('network')
@@ -358,6 +365,18 @@ module Vmpooler
358
365
  vm_hash
359
366
  end
360
367
 
368
+ def create_config_spec(vm_name, template_name, extra_config)
369
+ RbVmomi::VIM.VirtualMachineConfigSpec(
370
+ annotation: JSON.pretty_generate(
371
+ name: vm_name,
372
+ created_by: provider_config['username'],
373
+ base_template: template_name,
374
+ creation_timestamp: Time.now.utc
375
+ ),
376
+ extraConfig: extra_config
377
+ )
378
+ end
379
+
361
380
  def create_relocate_spec(target_datastore, target_datacenter_name, pool_name, connection)
362
381
  pool = pool_config(pool_name)
363
382
  target_cluster_name = get_target_cluster_from_config(pool_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vmpooler
4
- VERSION = '0.15.0'
4
+ VERSION = '0.17.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmpooler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.17.0
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-30 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -72,98 +72,98 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.6.0
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: 0.6.0
82
+ version: 0.7.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: opentelemetry-exporter-jaeger
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.6.0
89
+ version: 0.7.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.6.0
96
+ version: 0.7.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: opentelemetry-instrumentation-concurrent_ruby
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.6.0
103
+ version: 0.7.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.6.0
110
+ version: 0.7.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: opentelemetry-instrumentation-redis
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.6.0
117
+ version: 0.7.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.6.0
124
+ version: 0.7.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: opentelemetry-instrumentation-sinatra
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.6.0
131
+ version: 0.7.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.6.0
138
+ version: 0.7.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: opentelemetry-resource_detectors
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.6.0
145
+ version: 0.7.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.6.0
152
+ version: 0.7.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: opentelemetry-sdk
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.6.0
159
+ version: 0.7.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.6.0
166
+ version: 0.7.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: pickup
169
169
  requirement: !ruby/object:Gem::Requirement