launcher: add pool quota debug and log information
This change logs the current pool quota as DEBUG and adds a INFO log when a pool doesn't have enough quota to satisfy a request. Change-Id: I78445f21f251d206d4fb0dce817a992685c8b319
This commit is contained in:
@@ -446,10 +446,13 @@ class NodeRequestHandler(NodeRequestHandlerNotifications,
|
|||||||
# If we calculate that we're at capacity, pause until nodes
|
# If we calculate that we're at capacity, pause until nodes
|
||||||
# are released by Zuul and removed by the DeletedNodeWorker.
|
# are released by Zuul and removed by the DeletedNodeWorker.
|
||||||
if not self.hasRemainingQuota(ntype):
|
if not self.hasRemainingQuota(ntype):
|
||||||
|
self.log.info(
|
||||||
|
"Not enough quota remaining to satisfy request %s",
|
||||||
|
self.request.id)
|
||||||
if not self.paused:
|
if not self.paused:
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
"Pausing request handling to satisfy request %s",
|
"Pausing request handling to satisfy request %s",
|
||||||
self.request)
|
self.request.id)
|
||||||
self.paused = True
|
self.paused = True
|
||||||
self.zk.deleteOldestUnusedNode(self.provider.name,
|
self.zk.deleteOldestUnusedNode(self.provider.name,
|
||||||
self.pool.name)
|
self.pool.name)
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ class OpenStackNodeRequestHandler(NodeRequestHandler):
|
|||||||
default=math.inf)
|
default=math.inf)
|
||||||
pool_quota.subtract(
|
pool_quota.subtract(
|
||||||
self.manager.estimatedNodepoolQuotaUsed(self.zk, self.pool))
|
self.manager.estimatedNodepoolQuotaUsed(self.zk, self.pool))
|
||||||
|
self.log.debug("Current pool quota: %s" % pool_quota)
|
||||||
pool_quota.subtract(needed_quota)
|
pool_quota.subtract(needed_quota)
|
||||||
self.log.debug("Predicted remaining pool quota: %s", pool_quota)
|
self.log.debug("Predicted remaining pool quota: %s", pool_quota)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user