mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Fail and redeploy if VM not 'ready' after 10 minutes
This commit is contained in:
parent
71a9150631
commit
d957ddd089
1 changed files with 7 additions and 0 deletions
|
|
@ -44,6 +44,13 @@ def check_vm vm, pool
|
|||
$logger.log('s', "[>] [#{pool}] '#{vm}' moved to 'ready' queue")
|
||||
else
|
||||
$logger.log('d', "[!] [#{pool}] '#{vm}' hostname does not match guest")
|
||||
|
||||
if ((((Time.now - $vsphere_helper.find_vms(vm)[vm].runtime.bootTime)/60).to_s[/^\d+\.\d{1}/].to_f) > 10)
|
||||
$redis.srem('vmware_host_pool__pending__'+pool, vm)
|
||||
$redis.sadd('vmware_host_pool__completed__'+pool, vm)
|
||||
|
||||
$logger.log('d', "[!] [#{pool}] '#{vm}' marked as 'failed' after 10 minutes")
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue