mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-70) Update check_running_vm for VM Provider
Previously the Pool Manager would use vSphere objects directly. This commit - Modifies the pool_manager to use the VM provider methods instead
This commit is contained in:
parent
8c421aa3bd
commit
cc1910fd76
2 changed files with 16 additions and 12 deletions
|
|
@ -149,12 +149,17 @@ module Vmpooler
|
|||
|
||||
def check_running_vm(vm, pool, ttl, provider)
|
||||
Thread.new do
|
||||
_check_running_vm(vm, pool, ttl, provider)
|
||||
begin
|
||||
_check_running_vm(vm, pool, ttl, provider)
|
||||
rescue => err
|
||||
$logger.log('s', "[!] [#{pool}] '#{vm}' failed while checking VM with an error: #{err}")
|
||||
raise
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def _check_running_vm(vm, pool, ttl, provider)
|
||||
host = provider.find_vm(vm)
|
||||
host = provider.get_vm(pool, vm)
|
||||
|
||||
if host
|
||||
queue_from, queue_to = 'running', 'completed'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue