From 9dd6db4baec104fe811be8fecece40c05788cdff Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Wed, 15 May 2013 09:09:10 +0000 Subject: 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 --- nova/exception.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova/exception.py') 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") -- cgit