From c59453bf84cb49f8bb2c7d08af2c8355bb5b8ad2 Mon Sep 17 00:00:00 2001 From: Sam Morrison Date: Wed, 5 Sep 2018 11:03:48 +1000 Subject: [PATCH] Fix DB archiver AttributeError due to wrong table name attribute used Change-Id: I658a12b3672eb8b1e97522259e9a212b3e6ab161 Closes-bug: #1790750 (cherry picked from commit d0657f4acf30f77ae978bf95a9d7ce76fe97a56c) --- nova/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 8e2f9c121306..ce6fe5e3579a 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -6427,7 +6427,7 @@ def _archive_if_instance_deleted(table, shadow_table, instances, conn, return result_delete.rowcount except db_exc.DBReferenceError as ex: LOG.warning(_LW('Failed to archive %(table)s: %(error)s'), - {'table': table.__tablename__, + {'table': table.name, 'error': six.text_type(ex)}) return 0