summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-02 20:16:59 +0000
committerGerrit Code Review <review@openstack.org>2019-01-02 20:16:59 +0000
commitf8bf6afd08bcdcee06b377fda71ad543a63f2ffc (patch)
tree4b2451b2c0a172723f375b686fa584bebe640706
parent89c7c6f80afac0fca3ffd8d12550ca956baad58c (diff)
parent17ebcdd286330f05a0d6f5d8b28d49723dd271be (diff)
Merge "Ignore removed provider in _cleanupLeakedInstances"3.4.0
-rwxr-xr-xnodepool/launcher.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nodepool/launcher.py b/nodepool/launcher.py
index 8a2b734..90548b8 100755
--- a/nodepool/launcher.py
+++ b/nodepool/launcher.py
@@ -504,7 +504,8 @@ class CleanupWorker(BaseCleanupWorker):
504 ''' 504 '''
505 for provider in self._nodepool.config.providers.values(): 505 for provider in self._nodepool.config.providers.values():
506 manager = self._nodepool.getProviderManager(provider.name) 506 manager = self._nodepool.getProviderManager(provider.name)
507 manager.cleanupLeakedResources() 507 if manager:
508 manager.cleanupLeakedResources()
508 509
509 def _cleanupMaxReadyAge(self): 510 def _cleanupMaxReadyAge(self):
510 ''' 511 '''
@@ -921,7 +922,7 @@ class NodePool(threading.Thread):
921 return self.zk 922 return self.zk
922 923
923 def getProviderManager(self, provider_name): 924 def getProviderManager(self, provider_name):
924 return self.config.provider_managers[provider_name] 925 return self.config.provider_managers.get(provider_name)
925 926
926 def getPoolWorkers(self, provider_name): 927 def getPoolWorkers(self, provider_name):
927 return [t for t in self._pool_threads.values() if 928 return [t for t in self._pool_threads.values() if