From b77bcf38d794543e3361fa968787d5cb6ce3887d Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Fri, 13 Nov 2015 20:56:55 +0200 Subject: [PATCH] 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 --- cinder/db/sqlalchemy/api.py | 1 + 1 file changed, 1 insertion(+) 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(): -- 2.45.2