diff options
author | Chris Behrens <cbehrens@codestud.com> | 2013-05-15 09:09:10 +0000 |
---|---|---|
committer | Chris Behrens <cbehrens@codestud.com> | 2013-05-15 09:09:10 +0000 |
commit | 9dd6db4baec104fe811be8fecece40c05788cdff (patch) | |
tree | b05237a3f85c57f53423edbdd899feac84b628c8 /nova/exception.py | |
parent | f124d50024fbddb56733831149012f6f4c9c3e6e (diff) | |
download | nova-9dd6db4baec104fe811be8fecece40c05788cdff.tar.gz nova-9dd6db4baec104fe811be8fecece40c05788cdff.tar.xz nova-9dd6db4baec104fe811be8fecece40c05788cdff.zip |
Cells: Don't allow active -> build
Adds support for passing 'expected_vm_state' in an instance_update dict
much like the current support for 'expected_task_state'.
For cells, when the API cell receives an instance update containing a
vm_state of BUILDING, raise an exception if the instance is in some
other state. This addresses out-of-order messaging issues that can
cause an instance to appear to have a huge delay going ACTIVE. (A
periodic task run can later heal the state, but it can take a long
while)
Fixes bug 1180283
Change-Id: I64252b30e2596812f3b84da64b1fc8681661d7f8
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index a9afe37a7..b4f453846 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1153,6 +1153,11 @@ class InstanceActionEventNotFound(NovaException): message = _("Event %(event)s not found for action id %(action_id)s") +class UnexpectedVMStateError(NovaException): + message = _("unexpected VM state: expecting %(expected)s but " + "the actual state is %(actual)s") + + class CryptoCAFileNotFound(FileNotFound): message = _("The CA file for %(project)s could not be found") |