Log unknown providers during quota calculation
When determining quota usage for known nodes log cases where the provider config isn't known. One theory is that this can happen when launchers are restarted and that it is otherwise normal but without more information it is hard to know for sure. Log the node data when we hit this sutation so that we can dig in more and debug this. Change-Id: I466e64a999ebf867ada9462a0c00a90de4b70125
This commit is contained in:
parent
ded8fd80d8
commit
310ea2fe9d
@ -221,8 +221,16 @@ class OpenStackProvider(Provider):
|
||||
if node.provider == self.provider.name:
|
||||
if pool and not node.pool == pool.name:
|
||||
continue
|
||||
provider_pool = self.provider.pools.get(node.pool)
|
||||
if not provider_pool:
|
||||
self.log.warning(
|
||||
"Cannot find provider pool for node %s" % node)
|
||||
# This node is in a funny state we log it for debugging
|
||||
# but move on and don't account it as we can't properly
|
||||
# calculate its cost without pool info.
|
||||
continue
|
||||
node_resources = self.quotaNeededByNodeType(
|
||||
node.type, self.provider.pools.get(node.pool))
|
||||
node.type, provider_pool)
|
||||
used_quota.add(node_resources)
|
||||
return used_quota
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user