summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/manager.py
diff options
context:
space:
mode:
authorJay Lau <jay.lau.513@gmail.com>2013-05-21 20:56:06 +0800
committerJay Lau <jay.lau.513@gmail.com>2013-06-09 12:09:34 +0800
commitf396f75d14f9da97a566e2e5607f537b07a6803a (patch)
treeb669ac494586f518aab9c28bcb3c23a07b953342 /nova/scheduler/manager.py
parente0142d0f63bf64a07db3bd3b840fc2072d2e6ca3 (diff)
downloadnova-f396f75d14f9da97a566e2e5607f537b07a6803a.tar.gz
nova-f396f75d14f9da97a566e2e5607f537b07a6803a.tar.xz
nova-f396f75d14f9da97a566e2e5607f537b07a6803a.zip
Put VM UUID to live migration error notification
If live migration encounter some exception before nova scheduler cast message to nova compute, nova scheduler will set the VM state to ERROR and send notification, but the notification do not include VM UUID, this might cause some problem if some components want to handle the notification since those components will not able to know the VM UUID about the notification. The solution is add UUID to live migration error notification so other components can get the related notification correctly. Fix bug 1182117 Change-Id: Id101f9e2a689a02d1604c12cd7677e0975bd7428
Diffstat (limited to 'nova/scheduler/manager.py')
-rw-r--r--nova/scheduler/manager.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py
index ca7cd956f..52ef71e62 100644
--- a/nova/scheduler/manager.py
+++ b/nova/scheduler/manager.py
@@ -123,10 +123,13 @@ class SchedulerManager(manager.Manager):
expected_task_state=task_states.MIGRATING,),
context, ex, request_spec)
except Exception as ex:
+ request_spec = {'instance_properties': {
+ 'uuid': instance['uuid'], },
+ }
with excutils.save_and_reraise_exception():
self._set_vm_state_and_notify('live_migration',
{'vm_state': vm_states.ERROR},
- context, ex, {})
+ context, ex, request_spec)
def run_instance(self, context, request_spec, admin_password,
injected_files, requested_networks, is_first_time,