From 6e9a2f42616859963034bab6c21c793f05a5ba8d Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 26 Feb 2013 01:47:42 -0500 Subject: Retry floating_ip_fixed_ip_associate on deadlock. Update the floating_ip_fixed_ip_associate method of the sqlalchemy db API to retry if it fails because of a deadlock. The decorator that handles this was introduced in e53e22271ed7e7a9b919d817a8eb50a1ecce16f8. The related bug report shows that this method could benefit from the use of this decorator. Fix bug 1090016. Change-Id: I0159470e6eb2f8017bcb3e659e7b119194dda920 --- nova/db/sqlalchemy/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 1baa192a3..a23d1afb1 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -759,6 +759,7 @@ def floating_ip_count_by_project(context, project_id, session=None): @require_context +@_retry_on_deadlock def floating_ip_fixed_ip_associate(context, floating_address, fixed_address, host): session = get_session() -- cgit