mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Add a check to make sure hostname still matches
This commit is contained in:
parent
1aee738d4a
commit
6eabe156d9
1 changed files with 10 additions and 0 deletions
|
|
@ -115,6 +115,16 @@ def check_ready_vm vm, pool, ttl
|
|||
|
||||
$logger.log('d', "[!] [#{pool}] '#{vm}' appears to be powered off, removed from 'ready' queue")
|
||||
end
|
||||
|
||||
if (
|
||||
(host.summary.guest) and
|
||||
(host.summary.guest.hostName) and
|
||||
(host.summary.guest.hostName != vm)
|
||||
)
|
||||
$redis.smove('vmware_host_pool__ready__'+pool, 'vmware_host_pool__completed__'+pool, vm)
|
||||
|
||||
$logger.log('d', "[!] [#{pool}] '#{vm}' has mismatched hostname, removed from 'ready' queue")
|
||||
end
|
||||
else
|
||||
$redis.srem('vmware_host_pool__ready__'+pool, vm)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue