live migration did not send notification for other componments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Guangya Liu (Jay Lau) |
Bug Description
Currently, if live migration failed, nova compute did not send notification, this caused other service such as nova-scheduler has no chance to do some operation based on the result of live migration.
It is better that we add notification logic for live_migration logic like other operations such as resize, run instance etc.
A proposed code diff would be as following, please feel free to show your comments if any. Thanks.
After some discussion with Joe, we work out a draft code diff for compute/manager.py. I did not get a chance to do some test, just append the logic here. Please show your comments if any.
root@liugya-
diff --git a/nova/
index 687594a..b8b99b6 100755
--- a/nova/
+++ b/nova/
@@ -3127,6 +3127,10 @@ class ComputeManager(
return self.driver.
+ @exception.
+ @reverts_task_state
+ @wrap_instance_
+ @wrap_instance_
def pre_live_
@@ -3146,6 +3150,10 @@ class ComputeManager(
+ self._notify_
+ context, instance, "pre.live_
+ network_
+
# TODO(tr3buchet): figure out how on the earth this is necessary
fixed_ips = network_
if not fixed_ips:
@@ -3173,7 +3181,14 @@ class ComputeManager(
# Preparation for block migration
if block_migration:
+ self._notify_
+ context, instance, "pre.live_
+ network_
+ @exception.
+ @reverts_task_state
+ @wrap_instance_
+ @wrap_instance_
def live_migration(
@@ -3286,6 +3301,10 @@ class ComputeManager(
+ @exception.
+ @reverts_task_state
+ @wrap_instance_
+ @wrap_instance_
def post_live_
"""Post operations for live migration .
@@ -3311,6 +3330,9 @@ class ComputeManager(
+ self._notify_
+ context, instance, "post.live_
+ network_
@@ -3326,6 +3348,9 @@ class ComputeManager(
# NOTE(vish): this is necessary to update dhcp
+ self._notify_
+ context, instance, "post.live_
+ network_
def _rollback_
@@ -3369,6 +3394,10 @@ class ComputeManager(
+ @exception.
+ @reverts_task_state
+ @wrap_instance_
+ @wrap_instance_
def rollback_
@@ -3377,6 +3406,9 @@ class ComputeManager(
"""
+ self._notify_
+ context, instance, "rollback.
+ network_
# NOTE(tr3buchet): tear down networks on destination host
@@ -3387,6 +3419,9 @@ class ComputeManager(
+ self._notify_
+ context, instance, "rollback.
+ network_
@manager.
def _heal_instance_
Changed in nova: | |
importance: | Undecided → Medium |
status: | Incomplete → Triaged |
Changed in nova: | |
assignee: | nobody → Jay Lau (jay-lau-513) |
Changed in nova: | |
status: | Triaged → In Progress |
Changed in nova: | |
milestone: | none → havana-1 |
status: | Fix Committed → Fix Released |
tags: | added: grizzly-backport-potential |
Changed in nova: | |
milestone: | havana-1 → 2013.2 |
tags: | removed: grizzly-backport-potential |
Please submit patch into Gerrit for review: /wiki.openstack .org/wiki/ Gerrit_ Workflow
https:/