nova/nova/api
Artom Lifshitz e72c6a3a49 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)
(cherry picked from commit 32dbd2f585)
(cherry picked from commit 8ee59604dc)
(cherry picked from commit a90fe19512)
2019-11-01 20:25:33 -04:00
..
ec2 delete more i18n log markers 2017-03-21 07:37:21 -04:00
metadata Merge "conf: Remove 'vendordata_driver' opt" 2018-01-19 11:41:15 +00:00
openstack Avoid error 500 on shelve task_state race 2019-11-01 20:25:33 -04:00
validation Enable reset keypair while rebuilding instance 2017-11-13 10:49:02 +08:00
__init__.py Remove unused copyright from nova.api.__init__ 2014-01-10 16:24:50 +08:00
auth.py delete more i18n log markers 2017-03-21 07:37:21 -04: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