From: Ivan Kolodyazhny Date: Fri, 13 Nov 2015 18:56:55 +0000 (+0200) Subject: Retry on database deadlock on service_update method X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b77bcf38d794543e3361fa968787d5cb6ce3887d;p=openstack-build%2Fcinder-build.git Retry on database deadlock on service_update method service_update could fail with deadlock in some active-active deployments. Added _retry_on_deadlock decorator to fix this issue. Change-Id: Icfedb5ec0042e1d588314d56856f9ebab537665e Closes-Bug: #1516124 --- diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index b3869e0ae..f3e26eb7f 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -436,6 +436,7 @@ def service_create(context, values): @require_admin_context +@_retry_on_deadlock def service_update(context, service_id, values): session = get_session() with session.begin():