diff options
author | Brian Elliott <bdelliott@gmail.com> | 2013-04-16 21:42:23 +0000 |
---|---|---|
committer | Brian Elliott <bdelliott@gmail.com> | 2013-04-26 15:17:25 +0000 |
commit | 433e6885fd276aa2b78688745aec3ef50a06452a (patch) | |
tree | d3ce0abf273bfb37f5a66bd2d843c65bd0797f3e /nova/exception.py | |
parent | 964df95013fe65d38b3675592ae02249e93d2bc5 (diff) | |
download | nova-433e6885fd276aa2b78688745aec3ef50a06452a.tar.gz nova-433e6885fd276aa2b78688745aec3ef50a06452a.tar.xz nova-433e6885fd276aa2b78688745aec3ef50a06452a.zip |
Refactor _run_instance() to unify control flow
_run_instance() had multiple points where various classes of errors
were handled. This patch classifies the possible error/exit conditions
into the following categories:
* success
* rescheduled - an error occurred, but the build will be returned to
scheduled for another attempt.
* aborted - build was aborted for a non-error. (e.x. instace was
deleted during spawn)
* fatal - general case of uncaught exceptions resulting in the instance
going to error.
blueprint create-error-notification
Change-Id: I3f01753bde8af0750ba9067c8a98ded45d5a0eb7
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index de922f50e..30b8ae0f1 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1215,3 +1215,12 @@ class UnsupportedHardware(Invalid): class Base64Exception(NovaException): message = _("Invalid Base 64 data for file %(path)s") + + +class BuildAbortException(NovaException): + message = _("Build of instance %(instance_uuid)s aborted: %(reason)s") + + +class RescheduledException(NovaException): + message = _("Build of instance %(instance_uuid)s was re-scheduled: " + "%(reason)s") |