nova/nova/api
Artom Lifshitz 32dbd2f585 Avoid error 500 on shelve task_state race
When shelving a server and saving its new SHELVING task state, we
expect the current task state to be None and do not handle any
UnexpectedTaskStateError exceptions that the database layer may throw
at us. In those cases, we return an error 500 to the user, when in
actuality an error 409 conflict would be more appropriate. This
patch makes the API layer handle UnexpectedTaskStateError exceptions
and return a 409 to the user.

Closes-bug: 1850694
Change-Id: Ie0b421cd5d3a5781c1dd09fab4ed013ece0f939d
(cherry picked from commit a423d8b277)
2019-11-01 19:50:26 -04:00
..
ec2 ec2: Remove unused functions from 'ec2utils' 2019-07-10 16:15:19 +01:00
metadata hacking: Resolve W503 (line break occurred before a binary operator) 2019-06-24 14:24:06 -05:00
openstack Avoid error 500 on shelve task_state race 2019-11-01 19:50:26 -04:00
validation Multiple API cleanup changes 2019-08-12 08:52:38 -05:00
__init__.py Remove unused copyright from nova.api.__init__ 2014-01-10 16:24:50 +08:00
auth.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00
compute_req_id.py Migrate to oslo request_id middleware - mv 2.46 2017-05-27 10:11:44 +00:00
manager.py Only setup iptables for metadata if using nova-net 2017-07-20 00:00:22 +00:00
wsgi.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00