nova/nova/api
Artom Lifshitz a90fe19512 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.

NOTE(artom) Conflict in imports in
nova/tests/unit/api/openstack/compute/test_shelve.py due to using
oslo's uuidsentinel as of 8e1ca5bf34 in
stein.

Closes-bug: 1850694
Change-Id: Ie0b421cd5d3a5781c1dd09fab4ed013ece0f939d
(cherry picked from commit a423d8b277)
(cherry picked from commit 32dbd2f585)
(cherry picked from commit 8ee59604dc)
2019-11-01 20:20:52 -04:00
..
ec2 delete more i18n log markers 2017-03-21 07:37:21 -04:00
metadata metadata: add vf_trusted field to device metadata 2018-05-31 13:55:10 -04:00
openstack Avoid error 500 on shelve task_state race 2019-11-01 20:20:52 -04:00
validation Use hard coded values in schema than reference 2018-07-11 01:34:46 +00:00
__init__.py
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