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 +4 -4
- data/lib/vmpooler/providers/vsphere.rb +16 -16
- data/lib/vmpooler-provider-vsphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89055d5655c089933c5e57db2fc1208fe6e52c0ab6b7a28001056fabac1d6be0
|
4
|
+
data.tar.gz: f319d467743e1ff8a570f07d6f019542bdc9b860c515728ffb3935fbcfd7a67c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
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
|
-
|
1142
|
-
|
1143
|
-
|
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
|
-
|
1163
|
-
|
1164
|
-
|
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
|
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.
|
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-
|
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
|