Merge "Move live-migration control flow from scheduler to conductor"
This commit is contained in:
@@ -132,8 +132,7 @@ class SchedulerManager(manager.Manager):
|
||||
def _schedule_live_migration(self, context, instance, dest,
|
||||
block_migration, disk_over_commit):
|
||||
task = live_migrate.LiveMigrationTask(context, instance,
|
||||
dest, block_migration, disk_over_commit,
|
||||
self.driver.select_hosts)
|
||||
dest, block_migration, disk_over_commit)
|
||||
return task.execute()
|
||||
|
||||
def run_instance(self, context, request_spec, admin_password,
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -271,7 +271,7 @@ class SchedulerManagerTestCase(test.NoDBTestCase):
|
||||
instance = {'host': 'h'}
|
||||
self.mox.StubOutClassWithMocks(live_migrate, "LiveMigrationTask")
|
||||
task = live_migrate.LiveMigrationTask(self.context, instance,
|
||||
"dest", "bm", "doc", self.manager.driver.select_hosts)
|
||||
"dest", "bm", "doc")
|
||||
task.execute()
|
||||
|
||||
self.mox.ReplayAll()
|
||||
|
||||
Reference in New Issue
Block a user