summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Henkel <tobias.henkel@bmw.de>2018-11-30 21:49:07 +0100
committerTobias Henkel <tobias.henkel@bmw.de>2018-11-30 21:50:42 +0100
commitf8d20d603cad9afdd85d9cfc82c559b32167d30f (patch)
tree2273f1bece632ee8ae3d3a868edc4d686948b54c
parentc2d410d9feae8205ab5977635d036cfdbfcc9cf4 (diff)
Fix leak detection in unmanaged quota calculation
The negation in the unmanaged quota calculation is wrong. This leads to the fact that nodepool things all of its nodes are leaked. Change-Id: I60b48a80dc597afa2ceb0a3faddd4c73ffa48c6f
Notes
Notes (review): Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 30 Nov 2018 21:34:24 +0000 Reviewed-on: https://review.openstack.org/621286 Project: openstack-infra/nodepool Branch: refs/heads/master
-rwxr-xr-xnodepool/driver/openstack/provider.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nodepool/driver/openstack/provider.py b/nodepool/driver/openstack/provider.py
index 325e9cb..a78255b 100755
--- a/nodepool/driver/openstack/provider.py
+++ b/nodepool/driver/openstack/provider.py
@@ -194,7 +194,8 @@ class OpenStackProvider(Provider):
194 # server so it must not be accounted for unmanaged 194 # server so it must not be accounted for unmanaged
195 # quota; unless it has leaked. 195 # quota; unless it has leaked.
196 nodepool_node_id = meta.get('nodepool_node_id') 196 nodepool_node_id = meta.get('nodepool_node_id')
197 if not (nodepool_node_id and nodepool_node_id in node_ids): 197 # FIXME(tobiash): Add a test case for this
198 if nodepool_node_id and nodepool_node_id in node_ids:
198 # It has not leaked. 199 # It has not leaked.
199 continue 200 continue
200 201