Glance api returns 500 Internal Server Error, if db deadlock occurs
in glance-registry for some reason while deleting an image.
Added `_retry_on_deadlock` decorator from Nova since we don't depend
on retrying library in Icehouse. Used this decorator on image_destroy
when db deadlock occures during image delete, which will again try to
delete the image from database.
Conflicts: glance/tests/unit/test_db.py
Note: In this patch, I've made few additional changes to add retrying
logic because retrying library is not available in Icehouse.
Closes-bug: 1378215
Change-Id: Ifad403e363daf368e846b5b6838432a7bedbe81a
(cherry picked from commit dae0fa8f1071be41d5541e9a5254abea48f5ba36)
Reviewed: https:/ /review. openstack. org/130029 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=4b5cb74e512 0decd618399d642 ebf06ad45d26a6
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 4b5cb74e5120dec d618399d642ebf0 6ad45d26a6
Author: ankitagrawal <email address hidden>
Date: Tue Oct 7 07:36:10 2014 -0700
Can not delete images if db deadlock occurs
Glance api returns 500 Internal Server Error, if db deadlock occurs
in glance-registry for some reason while deleting an image.
Added `_retry_ on_deadlock` decorator from Nova since we don't depend
on retrying library in Icehouse. Used this decorator on image_destroy
when db deadlock occures during image delete, which will again try to
delete the image from database.
Conflicts:
glance/ tests/unit/ test_db. py
Note: In this patch, I've made few additional changes to add retrying
logic because retrying library is not available in Icehouse.
Closes-bug: 1378215 68e846b5b683843 2a7bedbe81a 1d5541e9a5254ab ea48f5ba36)
Change-Id: Ifad403e363daf3
(cherry picked from commit dae0fa8f1071be4