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.
This commit is contained in:
kirby@puppetlabs.com 2017-04-14 18:47:55 -07:00
parent 0a879dac59
commit df6efccd3f

View file

@ -601,7 +601,7 @@ module Vmpooler
$providers[slot] ||= Vmpooler::VsphereHelper.new $config, $metrics $providers[slot] ||= Vmpooler::VsphereHelper.new $config, $metrics
$threads[slot] = Thread.new do $threads[pool['name']] = Thread.new do
_check_pool(pool, $providers[slot]) _check_pool(pool, $providers[slot])
end end
rescue => err rescue => err