Merge pull request #229 from glennsarti/fix-phantom-vms

(maint) Remove phantom VMs that are in Redis but don't exist in provider
This commit is contained in:
mattkirby 2017-08-01 10:38:25 -07:00 committed by GitHub
commit d789dfdfc8
2 changed files with 79 additions and 4 deletions

View file

@ -596,6 +596,7 @@ module Vmpooler
end
rescue => err
$logger.log('s', "[!] [#{pool['name']}] _check_pool failed with an error while inspecting inventory: #{err}")
return pool_check_response
end
# RUNNING
@ -608,6 +609,8 @@ module Vmpooler
rescue => err
$logger.log('d', "[!] [#{pool['name']}] _check_pool with an error while evaluating running VMs: #{err}")
end
else
move_vm_queue(pool['name'], vm, 'running', 'completed', 'is a running VM but is missing from inventory. Marking as completed.')
end
end
@ -620,6 +623,8 @@ module Vmpooler
rescue => err
$logger.log('d', "[!] [#{pool['name']}] _check_pool failed with an error while evaluating ready VMs: #{err}")
end
else
move_vm_queue(pool['name'], vm, 'ready', 'completed', 'is a ready VM but is missing from inventory. Marking as completed.')
end
end