mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Recover from failed clones/deletes
This commit is contained in:
parent
3a4146a0ed
commit
a67a6a1bfa
1 changed files with 5 additions and 0 deletions
|
|
@ -306,6 +306,9 @@ def check_pool pool
|
|||
begin
|
||||
destroy_vm(vm, pool['name'])
|
||||
rescue
|
||||
$logger.log('s', "[!] [#{pool['name']}] destroy appears to have failed")
|
||||
$redis.srem('vmware_host_pool__completed__'+pool['name'], vm)
|
||||
$redis.hdel('vmware_host_pool__active__'+pool['name'], vm)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -347,6 +350,8 @@ def check_pool pool
|
|||
pool['datastore']
|
||||
)
|
||||
rescue
|
||||
$logger.log('s', "[!] [#{pool['name']}] cloned appears to have failed")
|
||||
$redis.decr('vmware_host_pool__tasks__clone')
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue