Merge "launcher: add pool quota debug and log information"

This commit is contained in:
Zuul 2018-07-03 07:28:50 +00:00 committed by Gerrit Code Review
commit 729f34fced
2 changed files with 5 additions and 1 deletions

View File

@ -446,10 +446,13 @@ class NodeRequestHandler(NodeRequestHandlerNotifications,
# If we calculate that we're at capacity, pause until nodes
# are released by Zuul and removed by the DeletedNodeWorker.
if not self.hasRemainingQuota(ntype):
self.log.info(
"Not enough quota remaining to satisfy request %s",
self.request.id)
if not self.paused:
self.log.debug(
"Pausing request handling to satisfy request %s",
self.request)
self.request.id)
self.paused = True
self.zk.deleteOldestUnusedNode(self.provider.name,
self.pool.name)

View File

@ -306,6 +306,7 @@ class OpenStackNodeRequestHandler(NodeRequestHandler):
default=math.inf)
pool_quota.subtract(
self.manager.estimatedNodepoolQuotaUsed(self.zk, self.pool))
self.log.debug("Current pool quota: %s" % pool_quota)
pool_quota.subtract(needed_quota)
self.log.debug("Predicted remaining pool quota: %s", pool_quota)