summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenuka Apte <renuka.apte@citrix.com>2012-08-13 17:29:23 -0700
committerRenuka Apte <renuka.apte@citrix.com>2012-08-13 18:06:37 -0700
commit7af16893514bd27be51cf5e425679ddcce07688a (patch)
treed4a37133f8b4f93a8c6aaa82fa0857a69966a4ff
parente2bb812db3051e171a338f86e9fcfb35d95e47c8 (diff)
Fix rpc error with live_migration
Revert "Fix rpc error with live_migration." This reverts commit f72f3498656e8b4857001a1f3d194305245d56ba. Add missing topic argument topic=FLAGS.compute_topic, to nova/compute/api.py Fixes bug 1036449 Change-Id: I11b77da60c8f8aa28748f8968380bca5b7b80e73
-rw-r--r--nova/compute/api.py2
-rw-r--r--nova/scheduler/rpcapi.py6
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_admin_actions.py2
-rw-r--r--nova/tests/scheduler/test_rpcapi.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index cd3ffdf56..ddcb57751 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -1713,7 +1713,7 @@ class API(base.Base):
LOG.debug(_("Going to try to live migrate instance"),
instance=instance)
self.scheduler_rpcapi.live_migration(context, block_migration,
- disk_over_commit, instance, host)
+ disk_over_commit, instance, host, topic=FLAGS.compute_topic)
class HostAPI(base.Base):
diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py
index d73059c40..737bccb83 100644
--- a/nova/scheduler/rpcapi.py
+++ b/nova/scheduler/rpcapi.py
@@ -37,7 +37,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
- remove instance_type_id, add instance_type
- remove topic, it was unused
1.2 - Remove topic from run_instance, it was unused
- 1.3 - Remove instance_id and topic, add instance to live_migration
+ 1.3 - Remove instance_id, add instance to live_migration
1.4 - Remove update_db from prep_resize
'''
@@ -72,14 +72,14 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
return self.call(ctxt, self.make_msg('show_host_resources', host=host))
def live_migration(self, ctxt, block_migration, disk_over_commit,
- instance, dest):
+ instance, dest, topic):
# NOTE(comstud): Call vs cast so we can get exceptions back, otherwise
# this call in the scheduler driver doesn't return anything.
instance_p = jsonutils.to_primitive(instance)
return self.call(ctxt, self.make_msg('live_migration',
block_migration=block_migration,
disk_over_commit=disk_over_commit, instance=instance_p,
- dest=dest), version='1.3')
+ dest=dest, topic=topic), version='1.3')
def update_service_capabilities(self, ctxt, service_name, host,
capabilities):
diff --git a/nova/tests/api/openstack/compute/contrib/test_admin_actions.py b/nova/tests/api/openstack/compute/contrib/test_admin_actions.py
index 8da846125..6e075e974 100644
--- a/nova/tests/api/openstack/compute/contrib/test_admin_actions.py
+++ b/nova/tests/api/openstack/compute/contrib/test_admin_actions.py
@@ -65,7 +65,7 @@ def fake_compute_api_get(self, context, instance_id):
def fake_scheduler_api_live_migration(self, context, dest,
block_migration=False,
disk_over_commit=False, instance=None,
- instance_id=None):
+ instance_id=None, topic=None):
return None
diff --git a/nova/tests/scheduler/test_rpcapi.py b/nova/tests/scheduler/test_rpcapi.py
index 1fbc06390..109ff36a3 100644
--- a/nova/tests/scheduler/test_rpcapi.py
+++ b/nova/tests/scheduler/test_rpcapi.py
@@ -95,7 +95,7 @@ class SchedulerRpcAPITestCase(test.TestCase):
self._test_scheduler_api('live_migration', rpc_method='call',
block_migration='fake_block_migration',
disk_over_commit='fake_disk_over_commit',
- instance='fake_instance', dest='fake_dest',
+ instance='fake_instance', dest='fake_dest', topic='fake_topic',
version='1.3')
def test_update_service_capabilities(self):