diff options
author | Mark Washenberger <mark.washenberger@rackspace.com> | 2012-05-11 09:47:10 -0400 |
---|---|---|
committer | Mark Washenberger <mark.washenberger@rackspace.com> | 2012-05-31 11:06:57 -0400 |
commit | 91d007426f109dfef2142e28741edd51dcf1fdbc (patch) | |
tree | c273c4faabe6d333e61399e621936fe802053bd6 /nova/exception.py | |
parent | 0f2142b14adc442840c79a48add0dab78acf7c93 (diff) | |
download | nova-91d007426f109dfef2142e28741edd51dcf1fdbc.tar.gz nova-91d007426f109dfef2142e28741edd51dcf1fdbc.tar.xz nova-91d007426f109dfef2142e28741edd51dcf1fdbc.zip |
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
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 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 |