Browse Source

Merge "Ignore removed provider in _cleanupLeakedInstances"

tags/3.4.0^0
Zuul 4 months ago
parent
commit
f8bf6afd08
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      nodepool/launcher.py

+ 3
- 2
nodepool/launcher.py View File

@@ -504,7 +504,8 @@ class CleanupWorker(BaseCleanupWorker):
504 504
         '''
505 505
         for provider in self._nodepool.config.providers.values():
506 506
             manager = self._nodepool.getProviderManager(provider.name)
507
-            manager.cleanupLeakedResources()
507
+            if manager:
508
+                manager.cleanupLeakedResources()
508 509
 
509 510
     def _cleanupMaxReadyAge(self):
510 511
         '''
@@ -921,7 +922,7 @@ class NodePool(threading.Thread):
921 922
         return self.zk
922 923
 
923 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 927
     def getPoolWorkers(self, provider_name):
927 928
         return [t for t in self._pool_threads.values() if

Loading…
Cancel
Save