summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorHans Lindgren <hanlind@kth.se>2013-04-29 23:17:41 +0200
committerHans Lindgren <hanlind@kth.se>2013-05-01 18:51:54 +0200
commit9eb3dc7ed44d99652a17238724842e3067d46120 (patch)
tree8085e6229863a874678bb03d0d32f7b661d3f1a7 /nova/exception.py
parent3266bff670f6ab25ab8d850917898bf4ee2a705c (diff)
downloadnova-9eb3dc7ed44d99652a17238724842e3067d46120.tar.gz
nova-9eb3dc7ed44d99652a17238724842e3067d46120.tar.xz
nova-9eb3dc7ed44d99652a17238724842e3067d46120.zip
Reset migrating task state for MigrationError exceptions
Create an exception type for pre-check errors and add it to the list of exceptions for which instance task state is reset to ACTIVE to avoid cases where an instance get stuck in MIGRATING state. Convert existing instances of raise MigrationError in scheduler and driver pre-checks to have them raise the new MigrationPreCheckError exception instead. In addition, also make sure that expected exceptions are passed over RPC silently. Resolves bug 1171526. Change-Id: I00fa0962e555f895dd98861684ec7767fed3b37b
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index 698b49c2b..c81362dcf 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -946,6 +946,10 @@ class MigrationError(NovaException):
message = _("Migration error") + ": %(reason)s"
+class MigrationPreCheckError(MigrationError):
+ message = _("Migration pre-check error") + ": %(reason)s"
+
+
class MalformedRequestBody(NovaException):
message = _("Malformed message body: %(reason)s")