From a015fd87dca255dfd8efe4daf673455b1a07b50e Mon Sep 17 00:00:00 2001 From: "kirby@puppetlabs.com" Date: Wed, 13 May 2020 09:21:56 -0700 Subject: [PATCH] Do not show a pool as empty in status API when the configured size is 0 --- lib/vmpooler/api/v1.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmpooler/api/v1.rb b/lib/vmpooler/api/v1.rb index 40f1f3f..fe3e2f1 100644 --- a/lib/vmpooler/api/v1.rb +++ b/lib/vmpooler/api/v1.rb @@ -508,7 +508,7 @@ module Vmpooler end # for backwards compatibility, include separate "empty" stats in "status" block - if ready == 0 + if ready == 0 && max != 0 result[:status][:empty] ||= [] result[:status][:empty].push(pool['name'])