Move live-migration control flow from scheduler to conductor

This builds on previous patches that moved code to
the conductor and adding the conductor into the control path.

We take care to ensure this works with a local conductor, but
running the code in a greenlet thread, but this will work best
when conductor is run as a standalone service.

The next steps are to move more logic from the compute manager
into the conductor, then to start supporting dealing with
tasks that get stopped half way though execution.

Part of blueprint live-migration-to-conductor
Change-Id: I4120156db1499dfd3ed22095e528787eb73d33a6
This commit is contained in:
John Garbutt
2013-05-29 12:27:01 +01:00
committed by Gerrit Code Review
parent 618270d06f
commit f2026c5bdb
2 changed files with 1 additions and 16 deletions

View File

@@ -71,6 +71,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
2.8 - Deprecate prep_resize() -- JUST KIDDING. It is still used
by the compute manager for retries.
2.9 - Added the leagacy_bdm_in_spec parameter to run_instances
2.10 - Deprecated live_migration() call, moved to conductor
'''
#
@@ -122,16 +123,6 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
filter_properties=filter_properties,
reservations=reservations_p))
def live_migration(self, ctxt, block_migration, disk_over_commit,
instance, dest):
# 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))
def update_service_capabilities(self, ctxt, service_name, host,
capabilities):
self.fanout_cast(ctxt, self.make_msg('update_service_capabilities',

View File

@@ -70,12 +70,6 @@ class SchedulerRpcAPITestCase(test.NoDBTestCase):
request_spec='fake_request_spec',
filter_properties='fake_props', reservations=list('fake_res'))
def test_live_migration(self):
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')
def test_update_service_capabilities(self):
self._test_scheduler_api('update_service_capabilities',
rpc_method='fanout_cast', service_name='fake_name',