From 91d007426f109dfef2142e28741edd51dcf1fdbc Mon Sep 17 00:00:00 2001 From: Mark Washenberger Date: Fri, 11 May 2012 09:47:10 -0400 Subject: Eliminate a race condition on instance deletes. - Add constraint and equality conditions to nova.db[.sqlalchemy].api - Use host constraints to ensure the compute api doesn't simply delete an instance from the database that a compute manager has already started to run. This race condition is associated with bug #998117 Change-Id: Id74192d3e66bea073327342f57ce0f26987efd2d --- 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 1e1818e7d..aff188d01 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -419,6 +419,11 @@ class InvalidUUID(Invalid): message = _("Expected a uuid but received %(uuid).") +class ConstraintNotMet(NovaException): + message = _("Constraint not met.") + code = 412 + + class NotFound(NovaException): message = _("Resource could not be found.") code = 404 -- cgit