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
This commit is contained in:
@@ -38,6 +38,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
|||||||
- remove topic, it was unused
|
- remove topic, it was unused
|
||||||
1.2 - Remove topic from run_instance, it was unused
|
1.2 - Remove topic from run_instance, it was unused
|
||||||
1.3 - Remove instance_id, add instance to live_migration
|
1.3 - Remove instance_id, add instance to live_migration
|
||||||
|
1.4 - Remove update_db from prep_resize
|
||||||
'''
|
'''
|
||||||
|
|
||||||
BASE_RPC_API_VERSION = '1.0'
|
BASE_RPC_API_VERSION = '1.0'
|
||||||
@@ -59,13 +60,13 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
|||||||
reservations=reservations), version='1.2')
|
reservations=reservations), version='1.2')
|
||||||
|
|
||||||
def prep_resize(self, ctxt, instance, instance_type, image,
|
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_p = jsonutils.to_primitive(instance)
|
||||||
instance_type_p = jsonutils.to_primitive(instance_type)
|
instance_type_p = jsonutils.to_primitive(instance_type)
|
||||||
self.cast(ctxt, self.make_msg('prep_resize',
|
self.cast(ctxt, self.make_msg('prep_resize',
|
||||||
instance=instance_p, instance_type=instance_type_p,
|
instance=instance_p, instance_type=instance_type_p,
|
||||||
image=image, update_db=update_db, request_spec=request_spec,
|
image=image, request_spec=request_spec,
|
||||||
filter_properties=filter_properties), version='1.1')
|
filter_properties=filter_properties), version='1.4')
|
||||||
|
|
||||||
def show_host_resources(self, ctxt, host):
|
def show_host_resources(self, ctxt, host):
|
||||||
return self.call(ctxt, self.make_msg('show_host_resources', host=host))
|
return self.call(ctxt, self.make_msg('show_host_resources', host=host))
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ class SchedulerRpcAPITestCase(test.TestCase):
|
|||||||
self._test_scheduler_api('prep_resize', rpc_method='cast',
|
self._test_scheduler_api('prep_resize', rpc_method='cast',
|
||||||
instance='fake_instance',
|
instance='fake_instance',
|
||||||
instance_type='fake_type', image='fake_image',
|
instance_type='fake_type', image='fake_image',
|
||||||
update_db='fake_update_db', request_spec='fake_request_spec',
|
request_spec='fake_request_spec',
|
||||||
filter_properties='fake_props', version='1.1')
|
filter_properties='fake_props', version='1.4')
|
||||||
|
|
||||||
def test_show_host_resources(self):
|
def test_show_host_resources(self):
|
||||||
self._test_scheduler_api('show_host_resources', rpc_method='call',
|
self._test_scheduler_api('show_host_resources', rpc_method='call',
|
||||||
|
|||||||
Reference in New Issue
Block a user