From 3f2c25cfac89500ddfe883e76ebfa3813a1f9103 Mon Sep 17 00:00:00 2001 From: Monsyne Dragon Date: Wed, 18 Jul 2012 20:46:09 +0000 Subject: Fix error in error handler in instance_usage_audit task. This fixes bug 1026307 In the periodic task that generates .exists notifications, if there is an exception generating the notification for an instance, it attempts to log the exception and continue. Alas, there is an error in the error handler that clobbers the original error, preventing it from being logged. Turns out a variable in for loop was 'instance_ref' in one part, but 'instance' in except clause. Fixed. Change-Id: Ic887d9078725ec9b676c4f49cf58b567759b6210 --- nova/compute/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index ac64b3636..f06752c25 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2378,10 +2378,10 @@ class ComputeManager(manager.SchedulerDependentManager): compute_utils.start_instance_usage_audit(context, begin, end, self.host, num_instances) - for instance_ref in instances: + for instance in instances: try: compute_utils.notify_usage_exists( - context, instance_ref, + context, instance, ignore_missing_network_data=False) successes += 1 except Exception: -- cgit