vmpooler-provider-vsphere 3.3.2 → 3.3.4

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: d9d1e5c560f99863e969eb9d646e39a5c403180f9897e9b0be79969aecad8a87
4
- data.tar.gz: 2027241040ee908ca07d7b4d153a07d94e9edffb5d26b61751d278a6171911fb
3
+ metadata.gz: 89055d5655c089933c5e57db2fc1208fe6e52c0ab6b7a28001056fabac1d6be0
4
+ data.tar.gz: f319d467743e1ff8a570f07d6f019542bdc9b860c515728ffb3935fbcfd7a67c
5
5
  SHA512:
6
- metadata.gz: 6e7c0160091ecd07f882c6c30bef4f35f57f780a829d0aa2f364d33103cf9a75e3611d7f9c8f448549c37fe29a7007ec4e96b34b7114f54b2a1c09b74ea156c9
7
- data.tar.gz: 49bc7405f68116ea1843ab53b239a68df3eb544aa59167451bd4e7d8ad586ff0d601019b0be6c18a283d3d9596829e8cfafb1c62b70b2ab05df549ce58836090
6
+ metadata.gz: 3ab52b86c880df03c88934336d99a6ab0314eb758fe6e623cd88269e61a1214e64db692c60d72adfa4b9b8230caa02aecb025d527127792f8efcde3708a73ea3
7
+ data.tar.gz: 50205ce2612b97551072c2fbdc6383e0e49e27f12ae8c6264a80b7b69a5b3a7a8d32d2c53382ce12d0a70bcdaf8dda00adbfc7ea3e5f3524de4e5ccec2d366aa
@@ -68,14 +68,14 @@ module Vmpooler
68
68
  try = 0 if try.nil?
69
69
  max_tries = 3
70
70
  @redis.with_metrics do |redis|
71
- redis.multi
72
- redis.srem("vmpooler__completed__#{pool}", vm_name)
73
- redis.hdel("vmpooler__active__#{pool}", vm_name)
74
- redis.hset("vmpooler__vm__#{vm_name}", 'destroy', Time.now)
75
-
76
- # Auto-expire metadata key
77
- redis.expire("vmpooler__vm__#{vm_name}", (data_ttl * 60 * 60))
78
- redis.exec
71
+ redis.multi do |transaction|
72
+ transaction.srem("vmpooler__completed__#{pool}", vm_name)
73
+ transaction.hdel("vmpooler__active__#{pool}", vm_name)
74
+ transaction.hset("vmpooler__vm__#{vm_name}", 'destroy', Time.now.to_s)
75
+
76
+ # Auto-expire metadata key
77
+ transaction.expire("vmpooler__vm__#{vm_name}", (data_ttl * 60 * 60))
78
+ end
79
79
  end
80
80
 
81
81
  start = Time.now
@@ -1137,10 +1137,10 @@ module Vmpooler
1137
1137
  target_host_object = find_host_by_dnsname(connection, target_host_name)
1138
1138
  finish = migrate_vm_and_record_timing(pool_name, vm_name, vm_hash, target_host_object, target_host_name)
1139
1139
  @redis.with_metrics do |redis|
1140
- redis.multi
1141
- redis.hset("vmpooler__vm__#{vm_name}", 'host', target_host_name)
1142
- redis.hset("vmpooler__vm__#{vm_name}", 'migrated', true)
1143
- redis.exec
1140
+ redis.multi do |transaction|
1141
+ transaction.hset("vmpooler__vm__#{vm_name}", 'host', target_host_name)
1142
+ transaction.hset("vmpooler__vm__#{vm_name}", 'migrated', 'true')
1143
+ end
1144
1144
  end
1145
1145
  logger.log('s', "[>] [#{pool_name}] '#{vm_name}' migrated from #{vm_hash['host_name']} to #{target_host_name} in #{finish} seconds")
1146
1146
  ensure
@@ -1158,10 +1158,10 @@ module Vmpooler
1158
1158
  metrics.increment("migrate_to.#{dest_host_name}")
1159
1159
  @redis.with_metrics do |redis|
1160
1160
  checkout_to_migration = format('%<time>.2f', time: Time.now - Time.parse(redis.hget("vmpooler__vm__#{vm_name}", 'checkout')))
1161
- redis.multi
1162
- redis.hset("vmpooler__vm__#{vm_name}", 'migration_time', finish)
1163
- redis.hset("vmpooler__vm__#{vm_name}", 'checkout_to_migration', checkout_to_migration)
1164
- redis.exec
1161
+ redis.multi do |transaction|
1162
+ transaction.hset("vmpooler__vm__#{vm_name}", 'migration_time', finish)
1163
+ transaction.hset("vmpooler__vm__#{vm_name}", 'checkout_to_migration', checkout_to_migration)
1164
+ end
1165
1165
  end
1166
1166
  finish
1167
1167
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VmpoolerProviderVsphere
4
- VERSION = '3.3.2'
4
+ VERSION = '3.3.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmpooler-provider-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-23 00:00:00.000000000 Z
11
+ date: 2023-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement