summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwan Mellor <ewan.mellor@citrix.com>2011-01-07 18:11:04 +0000
committerEwan Mellor <ewan.mellor@citrix.com>2011-01-07 18:11:04 +0000
commit2ea4af0f3059ef2aee6e25db8849a39248983d30 (patch)
tree3f5fb6b4a62bec56a0f2eb3590f573700b0b072b
parente33102d23ec8f357c08e2583f8d9e3c1753bab4d (diff)
downloadnova-2ea4af0f3059ef2aee6e25db8849a39248983d30.tar.gz
nova-2ea4af0f3059ef2aee6e25db8849a39248983d30.tar.xz
nova-2ea4af0f3059ef2aee6e25db8849a39248983d30.zip
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.
-rw-r--r--nova/db/sqlalchemy/__init__.py5
-rw-r--r--nova/service.py7
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)