mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
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:
commit
d789dfdfc8
2 changed files with 79 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue