diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index b6f7ee823..9fd34b94a 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -337,6 +337,10 @@ def check_pool(pool) check_ready_vm(vm, pool['name'], pool['ready_ttl'] || 0) rescue end + else + $logger.log('d', "[*] [#{pool['name']}] vm #{vm} is not in inventory, removing from 'ready' queue") + $redis.srem('vmpooler__ready__' + pool['name'], vm) + $redis.del('vmpooler__vm__' + vm) end end @@ -355,6 +359,10 @@ def check_pool(pool) check_pending_vm(vm, pool['name'], pool['timeout']) rescue end + else + $logger.log('d', "[*] [#{pool['name']}] #{vm} not in inventory, removing from 'pending' queue") + $redis.srem('vmpooler__pending__' + pool['name'], vm) + $redis.del('vmpooler__vm__' + vm) end end