mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-70) Update move_pending_vm_to_ready 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
9f4fc903b9
commit
760dc1c67e
2 changed files with 7 additions and 17 deletions
|
|
@ -70,13 +70,9 @@ module Vmpooler
|
|||
end
|
||||
|
||||
def move_pending_vm_to_ready(vm, pool, host)
|
||||
if (host.summary) &&
|
||||
(host.summary.guest) &&
|
||||
(host.summary.guest.hostName) &&
|
||||
(host.summary.guest.hostName == vm)
|
||||
|
||||
if host['hostname'] == vm
|
||||
begin
|
||||
Socket.getaddrinfo(vm, nil) # WTF?
|
||||
Socket.getaddrinfo(vm, nil) # WTF? I assume this is just priming the local DNS resolver cache?!?!
|
||||
rescue
|
||||
end
|
||||
|
||||
|
|
@ -86,7 +82,7 @@ module Vmpooler
|
|||
$redis.smove('vmpooler__pending__' + pool, 'vmpooler__ready__' + pool, vm)
|
||||
$redis.hset('vmpooler__boot__' + Date.today.to_s, pool + ':' + vm, finish)
|
||||
|
||||
$logger.log('s', "[>] [#{pool}] '#{vm}' moved to 'ready' queue")
|
||||
$logger.log('s', "[>] [#{pool}] '#{vm}' moved from 'pending' to 'ready' queue")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue