From fbdd11f62d7d606a32569d1c6b831dad27236806 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 8 Aug 2012 21:09:14 +0000 Subject: [PATCH] scheduler prep_resize should not update instance['host'] This is done by the manager once things are ready on the destination compute node. Fixes bug 1034593 Also removes now-unneeded update_db argument passed via rpcapi and bumps scheduler rpcapi version for prep_resize to 1.4 Change-Id: I0ac3be39877f3afcf42f5996d0da90042fe7c6e3 --- nova/scheduler/rpcapi.py | 7 ++++--- nova/tests/scheduler/test_rpcapi.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py index 9965a162..737bccb8 100644 --- a/nova/scheduler/rpcapi.py +++ b/nova/scheduler/rpcapi.py @@ -38,6 +38,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy): - remove topic, it was unused 1.2 - Remove topic from run_instance, it was unused 1.3 - Remove instance_id, add instance to live_migration + 1.4 - Remove update_db from prep_resize ''' BASE_RPC_API_VERSION = '1.0' @@ -59,13 +60,13 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy): reservations=reservations), version='1.2') def prep_resize(self, ctxt, instance, instance_type, image, - update_db, request_spec, filter_properties): + request_spec, filter_properties): instance_p = jsonutils.to_primitive(instance) instance_type_p = jsonutils.to_primitive(instance_type) self.cast(ctxt, self.make_msg('prep_resize', instance=instance_p, instance_type=instance_type_p, - image=image, update_db=update_db, request_spec=request_spec, - filter_properties=filter_properties), version='1.1') + image=image, request_spec=request_spec, + filter_properties=filter_properties), version='1.4') def show_host_resources(self, ctxt, host): return self.call(ctxt, self.make_msg('show_host_resources', host=host)) diff --git a/nova/tests/scheduler/test_rpcapi.py b/nova/tests/scheduler/test_rpcapi.py index ff17d918..109ff36a 100644 --- a/nova/tests/scheduler/test_rpcapi.py +++ b/nova/tests/scheduler/test_rpcapi.py @@ -84,8 +84,8 @@ class SchedulerRpcAPITestCase(test.TestCase): self._test_scheduler_api('prep_resize', rpc_method='cast', instance='fake_instance', instance_type='fake_type', image='fake_image', - update_db='fake_update_db', request_spec='fake_request_spec', - filter_properties='fake_props', version='1.1') + request_spec='fake_request_spec', + filter_properties='fake_props', version='1.4') def test_show_host_resources(self): self._test_scheduler_api('show_host_resources', rpc_method='call',