diff options
authorPaul Belanger <>2019-02-12 12:25:54 -0500
committerPaul Belanger <>2019-02-12 12:25:54 -0500
commite8ac13027e35e804712467f46740542287d0992f (patch)
parent9c7843d28abde0e4487a17c1c38c4e8632c40672 (diff)
Properly handle TaskManagerStopped exception
When we lose a task manager, we won't be able to create an instances. Rather then continue to look until retries limit is reached, we raise an exception early. In the case of below, the retry limit is very high and results in logs being spammed with the following: 2019-02-12 16:41:15,628 ERROR nodepool.NodeLauncher-0001616109: Request 200-0000443406: Launch attempt 39047/999999999 failed for node 0001616109: Traceback (most recent call last): File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/nodepool/driver/openstack/", line 241, in launch self._launchNode() File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/nodepool/driver/openstack/", line 142, in _launchNode instance_properties=self.label.instance_properties) File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/nodepool/driver/openstack/", line 340, in createServer return self._client.create_server(wait=False, **create_args) File "<decorator-gen-32>", line 2, in create_server File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/openstack/cloud/", line 377, in func_wrapper return func(*args, **kwargs) File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/openstack/cloud/", line 7020, in create_server, json=server_json)) File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/keystoneauth1/", line 357, in post return self.request(url, 'POST', **kwargs) File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/openstack/", line 154, in request **kwargs) File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/openstack/", line 219, in submit_function return self.submit_task(task) File "/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages/openstack/", line 185, in submit_task openstack.exceptions.TaskManagerStopped: TaskManager rdo-cloud-tripleo is no longer running Change-Id: I5f907d19ec1e637defe90eb944f4e5bd759e8a74 Signed-off-by: Paul Belanger <>
Notes (review): Code-Review+2: Clark Boylan <> Code-Review+2: Tobias Henkel <> Code-Review+1: Fabien Boucher <> Code-Review+2: David Shrewsbury <> Workflow+1: David Shrewsbury <> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 19 Feb 2019 15:26:03 +0000 Reviewed-on: Project: openstack-infra/nodepool Branch: refs/heads/master
1 files changed, 4 insertions, 0 deletions
diff --git a/nodepool/driver/openstack/ b/nodepool/driver/openstack/
index 16f426a..7e10684 100644
--- a/nodepool/driver/openstack/
+++ b/nodepool/driver/openstack/
@@ -241,6 +241,10 @@ class OpenStackNodeLauncher(NodeLauncher):
241 try: 241 try:
242 self._launchNode() 242 self._launchNode()
243 break 243 break
244 except openstack.exceptions.TaskManagerStopped:
245 # If we lost our TaskManager session, we won't be able to
246 # launch an instance, so there's no need to continue.
247 raise
244 except kze.SessionExpiredError: 248 except kze.SessionExpiredError:
245 # If we lost our ZooKeeper session, we've lost our node lock 249 # If we lost our ZooKeeper session, we've lost our node lock
246 # so there's no need to continue. 250 # so there's no need to continue.