summaryrefslogtreecommitdiffstats
path: root/nova/notifications.py
diff options
context:
space:
mode:
authorStanislaw Pitucha <stanislaw.pitucha@hp.com>2012-08-04 14:12:49 +0100
committerStanislaw Pitucha <stanislaw.pitucha@hp.com>2012-08-04 14:12:49 +0100
commit662cc871c8aaa96fea26c0eab75fed09e2995ee6 (patch)
treef1eab23356cea4e4565e9958cd826657262913fb /nova/notifications.py
parentff9578da2d042ba3d6cb7b6ded76de74c0754689 (diff)
downloadnova-662cc871c8aaa96fea26c0eab75fed09e2995ee6.tar.gz
nova-662cc871c8aaa96fea26c0eab75fed09e2995ee6.tar.xz
nova-662cc871c8aaa96fea26c0eab75fed09e2995ee6.zip
Fix notification logic
Notifications were always treated as if they're about state changes due to a typo. Additionally exception handler did not work correctly. Regression tests included. Change-Id: I0b92a1baa17768d9cf4e709b3331480548dd041e
Diffstat (limited to 'nova/notifications.py')
-rw-r--r--nova/notifications.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/notifications.py b/nova/notifications.py
index d0374ac16..913d01cdd 100644
--- a/nova/notifications.py
+++ b/nova/notifications.py
@@ -63,7 +63,7 @@ def send_update(context, old_instance, new_instance, service=None, host=None):
old_vm_state = old_instance["vm_state"]
new_vm_state = new_instance["vm_state"]
- old_task_state = old_instance["task_state"],
+ old_task_state = old_instance["task_state"]
new_task_state = new_instance["task_state"]
# we should check if we need to send a state change or a regular
@@ -90,7 +90,7 @@ def send_update(context, old_instance, new_instance, service=None, host=None):
service=service, host=host)
except Exception:
LOG.exception(_("Failed to send state update notification"),
- instance=instance)
+ instance=new_instance)
def send_update_with_states(context, instance, old_vm_state, new_vm_state,