summaryrefslogtreecommitdiff
path: root/nova/virt/vmwareapi/error_util.py
diff options
context:
space:
mode:
authorGary Kotton <gkotton@vmware.com>2014-04-22 03:36:51 -0700
committerGary Kotton <gkotton@vmware.com>2014-08-11 00:27:17 -0700
commitf89d13b141eba66487b3d858cd075a47b2de6016 (patch)
tree2638e2b1aaf764b42da5055a029be467d2d6e5da /nova/virt/vmwareapi/error_util.py
parenta74257db12699d5acaad259cb9700899b93d0734 (diff)
downloadnova-f89d13b141eba66487b3d858cd075a47b2de6016.tar.gz
VMware: handle case when VM snapshot delete fails
Minesweeper fails on occasion with concurrent access to files. If a snapshot deletion fails with the backend exception TaskInProgress then we will retry. A generic decorator has been added to do the retry operations. Closes-bug: #1310817 Change-Id: I8ed7a24ccd34aeea49352ac98f34ec2960edbf97
Diffstat (limited to 'nova/virt/vmwareapi/error_util.py')
-rw-r--r--nova/virt/vmwareapi/error_util.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/nova/virt/vmwareapi/error_util.py b/nova/virt/vmwareapi/error_util.py
index 89ce19df16..a61a85a251 100644
--- a/nova/virt/vmwareapi/error_util.py
+++ b/nova/virt/vmwareapi/error_util.py
@@ -32,6 +32,7 @@ INVALID_POWER_STATE = 'InvalidPowerState'
INVALID_PROPERTY = 'InvalidProperty'
NO_PERMISSION = 'NoPermission'
NOT_AUTHENTICATED = 'NotAuthenticated'
+TASK_IN_PROGRESS = 'TaskInProgress'
class VimException(Exception):
@@ -203,6 +204,10 @@ class InvalidPowerStateException(VMwareDriverException):
code = 409
+class TaskInProgress(VMwareDriverException):
+ msg_fmt = _("Virtual machine is busy.")
+
+
# Populate the fault registry with the exceptions that have
# special treatment.
_fault_classes_registry = {
@@ -215,7 +220,8 @@ _fault_classes_registry = {
INVALID_POWER_STATE: InvalidPowerStateException,
INVALID_PROPERTY: InvalidPropertyException,
NO_PERMISSION: NoPermissionException,
- NOT_AUTHENTICATED: NotAuthenticatedException
+ NOT_AUTHENTICATED: NotAuthenticatedException,
+ TASK_IN_PROGRESS: TaskInProgress,
}