From b6cadda05f35c8c7385a631626b09efc740c8ef9 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Tue, 11 Feb 2014 04:56:31 -0800 Subject: [PATCH] DB: logging exceptions should use save_and_reraise Commit 384cce84fde784f9e2f39db49502c66e20ff0b4c added logging of an exception. This should be done under save_and_reraise. Change-Id: Ib0d29ac8c51c6df9ad27d75a06b2c8ce66182e0c --- nova/db/sqlalchemy/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 8ce795fbeb..071f4ecbe2 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -881,9 +881,9 @@ def floating_ip_bulk_destroy(context, ips): reservations, project_id=project_id) except Exception: - LOG.exception(_("Failed to update usages bulk " - "deallocating floating IP")) - raise + with excutils.save_and_reraise_exception(): + LOG.exception(_("Failed to update usages bulk " + "deallocating floating IP")) @require_context