From df6efccd3f4916fa0434ce961990846e1b21dbe0 Mon Sep 17 00:00:00 2001 From: "kirby@puppetlabs.com" Date: Fri, 14 Apr 2017 18:47:55 -0700 Subject: [PATCH] Only use slot for provider management This commit reverts thread assignment for check_pool to a per-pool basis. Without this change a set of threads is shared in a manner that is not guaranteed to be thread safe. --- lib/vmpooler/pool_manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index b471634..19795b5 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -601,7 +601,7 @@ module Vmpooler $providers[slot] ||= Vmpooler::VsphereHelper.new $config, $metrics - $threads[slot] = Thread.new do + $threads[pool['name']] = Thread.new do _check_pool(pool, $providers[slot]) end rescue => err