From fcbba45dcf09f6087fabfaff1bcb960f0693ae76 Mon Sep 17 00:00:00 2001 From: Nikhil Komawar Date: Fri, 17 Feb 2012 02:24:08 +0000 Subject: InstanceNotFound exceptions for terminate_intance now Log warning instead of throwing exeptions. fixes bug 933012 Change-Id: Ib6c6c33e26125b561bd5a1bc1e710016746e7e44 --- nova/compute/manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index c228bc372..9310f208a 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -693,7 +693,10 @@ class ComputeManager(manager.SchedulerDependentManager): elevated = context.elevated() instance = self.db.instance_get_by_uuid(elevated, instance_uuid) compute_utils.notify_usage_exists(instance, current_period=True) - self._delete_instance(context, instance) + try: + self._delete_instance(context, instance) + except exception.InstanceNotFound as e: + LOG.warn(e) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) @checks_instance_lock -- cgit