From 2ea4af0f3059ef2aee6e25db8849a39248983d30 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Fri, 7 Jan 2011 18:11:04 +0000 Subject: Bug #699912: When failing to connect to a data store, Nova doesn't log which data store it tried to connect to Log FLAGS.sql_connection when failing to connect, to aid debugging. --- nova/db/sqlalchemy/__init__.py | 5 +++-- nova/service.py | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/nova/db/sqlalchemy/__init__.py b/nova/db/sqlalchemy/__init__.py index 22aa1cfe6..367fdda8b 100644 --- a/nova/db/sqlalchemy/__init__.py +++ b/nova/db/sqlalchemy/__init__.py @@ -39,5 +39,6 @@ for i in xrange(FLAGS.sql_max_retries): models.register_models() break except OperationalError: - logging.exception(_("Data store is unreachable." - " Trying again in %d seconds.") % FLAGS.sql_retry_interval) + logging.exception(_("Data store %s is unreachable." + " Trying again in %d seconds.") % + (FLAGS.sql_connection, FLAGS.sql_retry_interval)) diff --git a/nova/service.py b/nova/service.py index 7203430c6..a48d00e45 100644 --- a/nova/service.py +++ b/nova/service.py @@ -211,9 +211,10 @@ class Service(object): try: models.register_models() except OperationalError: - logging.exception(_("Data store is unreachable." - " Trying again in %d seconds.") % - FLAGS.sql_retry_interval) + logging.exception(_("Data store %s is unreachable." + " Trying again in %d seconds.") % + (FLAGS.sql_connection, + FLAGS.sql_retry_interval)) time.sleep(FLAGS.sql_retry_interval) -- cgit