Merge "Cleanup the exception LiveMigrationWithOldNovaNotSafe"
This commit is contained in:
@@ -333,8 +333,7 @@ class AdminActionsController(wsgi.Controller):
|
||||
exception.InvalidLocalStorage,
|
||||
exception.InvalidSharedStorage,
|
||||
exception.HypervisorUnavailable,
|
||||
exception.MigrationPreCheckError,
|
||||
exception.LiveMigrationWithOldNovaNotSafe) as ex:
|
||||
exception.MigrationPreCheckError) as ex:
|
||||
raise exc.HTTPBadRequest(explanation=ex.format_message())
|
||||
except exception.InstanceNotFound as e:
|
||||
raise exc.HTTPNotFound(explanation=e.format_message())
|
||||
|
||||
@@ -103,7 +103,6 @@ class MigrateServerController(wsgi.Controller):
|
||||
exception.InvalidSharedStorage,
|
||||
exception.HypervisorUnavailable,
|
||||
exception.MigrationPreCheckError,
|
||||
exception.LiveMigrationWithOldNovaNotSafe,
|
||||
exception.LiveMigrationWithOldNovaNotSupported) as ex:
|
||||
raise exc.HTTPBadRequest(explanation=ex.format_message())
|
||||
except exception.InstanceIsLocked as e:
|
||||
|
||||
@@ -172,7 +172,6 @@ class ComputeTaskManager(base.Base):
|
||||
exception.HypervisorUnavailable,
|
||||
exception.InstanceInvalidState,
|
||||
exception.MigrationPreCheckError,
|
||||
exception.LiveMigrationWithOldNovaNotSafe,
|
||||
exception.LiveMigrationWithOldNovaNotSupported,
|
||||
exception.UnsupportedPolicyException)
|
||||
def migrate_server(self, context, instance, scheduler_hint, live, rebuild,
|
||||
@@ -320,7 +319,6 @@ class ComputeTaskManager(base.Base):
|
||||
exception.HypervisorUnavailable,
|
||||
exception.InstanceInvalidState,
|
||||
exception.MigrationPreCheckError,
|
||||
exception.LiveMigrationWithOldNovaNotSafe,
|
||||
exception.LiveMigrationWithOldNovaNotSupported,
|
||||
exception.MigrationSchedulerRPCError) as ex:
|
||||
with excutils.save_and_reraise_exception():
|
||||
|
||||
@@ -1869,12 +1869,6 @@ class NoLiveMigrationForConfigDriveInLibVirt(NovaException):
|
||||
"drive data is shared across compute nodes.")
|
||||
|
||||
|
||||
class LiveMigrationWithOldNovaNotSafe(NovaException):
|
||||
msg_fmt = _("Host %(server)s is running an old version of Nova, "
|
||||
"live migrations involving that version may cause data loss. "
|
||||
"Upgrade Nova on %(server)s and try again.")
|
||||
|
||||
|
||||
class LiveMigrationWithOldNovaNotSupported(NovaException):
|
||||
msg_fmt = _("Live migration with API v2.25 requires all the Mitaka "
|
||||
"upgrade to be complete before it is available.")
|
||||
|
||||
@@ -264,10 +264,6 @@ class MigrateServerTestsV21(admin_only_action_common.CommonTests):
|
||||
self._test_migrate_live_failed_with_exception(
|
||||
exception.MigrationPreCheckError(reason=''))
|
||||
|
||||
def test_migrate_live_migration_with_old_nova_not_safe(self):
|
||||
self._test_migrate_live_failed_with_exception(
|
||||
exception.LiveMigrationWithOldNovaNotSafe(server=''))
|
||||
|
||||
def test_migrate_live_migration_with_unexpected_error(self):
|
||||
self._test_migrate_live_failed_with_exception(
|
||||
exception.MigrationError(reason=''),
|
||||
|
||||
@@ -1300,7 +1300,6 @@ class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase):
|
||||
state='', method=''),
|
||||
exc.DestinationHypervisorTooOld(),
|
||||
exc.HypervisorUnavailable(host='dummy'),
|
||||
exc.LiveMigrationWithOldNovaNotSafe(server='dummy'),
|
||||
exc.LiveMigrationWithOldNovaNotSupported(),
|
||||
exc.MigrationPreCheckError(reason='dummy'),
|
||||
exc.InvalidSharedStorage(path='dummy', reason='dummy'),
|
||||
|
||||
Reference in New Issue
Block a user