From 9249785be48079bbacc162f2e627a5aee1aa5871 Mon Sep 17 00:00:00 2001 From: Brian Elliott Date: Wed, 27 Feb 2013 05:06:12 +0000 Subject: Suppress retries on UnexpectedTaskStateErrors Don't try to re-schedule if an UnexpectedTaskStateError occurs during a build. If the instance was deleted mid-build, just catch the exception and log a message. Change-Id: I5e577f252ee71f310a749186060808723b676854 --- nova/compute/manager.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nova/compute') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 99b97e921..9ca00bd9b 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -780,6 +780,13 @@ class ComputeManager(manager.SchedulerDependentManager): msg = _('Failed to dealloc network for deleted instance') LOG.exception(msg, instance=instance) raise + except exception.UnexpectedTaskStateError as e: + actual_task_state = e.kwargs.get('actual', None) + if actual_task_state == 'deleting': + msg = _('Instance was deleted during spawn.') + LOG.debug(msg, instance=instance) + else: + raise except Exception: exc_info = sys.exc_info() # try to re-schedule instance: -- cgit