Cleanup the exception LiveMigrationWithOldNovaNotSafe

It has been reported that the exception LiveMigrationWithOldNovaNotSafe
is not useful since the change
I5651fb7ba95f38e2e2f8a48a98ff04072c6bb885.
This patch will cleanup the definition and the occurences of
that exception.

Change-Id: I7a5b677904d83104c4f5367b0245eebd422e2338
Closes-Bug: #1550282
This commit is contained in:
Marcellin Fom Tchassem
2016-03-21 23:44:22 -05:00
parent 2adeb47bf6
commit c52442a01f
6 changed files with 1 additions and 16 deletions

View File

@@ -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())

View File

@@ -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:

View File

@@ -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():

View File

@@ -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.")

View File

@@ -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=''),

View File

@@ -1157,7 +1157,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'),