summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMonsyne Dragon <mdragon@rackspace.com>2012-07-18 20:46:09 +0000
committerMonsyne Dragon <mdragon@rackspace.com>2012-07-19 20:07:45 +0000
commit3f2c25cfac89500ddfe883e76ebfa3813a1f9103 (patch)
treee97806ea9f1463e7eb280a5690dd5a720a38e45a
parentf8b83b7220955252453a71046ef29f07e082ebca (diff)
downloadnova-3f2c25cfac89500ddfe883e76ebfa3813a1f9103.tar.gz
nova-3f2c25cfac89500ddfe883e76ebfa3813a1f9103.tar.xz
nova-3f2c25cfac89500ddfe883e76ebfa3813a1f9103.zip
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
-rw-r--r--nova/compute/manager.py4
1 files changed, 2 insertions, 2 deletions
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: