summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-03-03 13:41:41 +0000
committerGerrit Code Review <review@openstack.org>2014-03-03 13:41:41 +0000
commitfe48d3de43f1d8101e8e3672d8d887261d107311 (patch)
tree4b3a854e3b60c5fc8153be000153f795ffe6686f
parentdcdbf6723ce6050cbf59ebd27d4a1531b2dcf0c4 (diff)
parent2bb8ce82791effea031ffa620d37574d307f7c4f (diff)
downloadnova-fe48d3de43f1d8101e8e3672d8d887261d107311.tar.gz
Merge "Add db2 communication error code when check the db connection" into stable/havana
-rw-r--r--nova/openstack/common/db/sqlalchemy/session.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/openstack/common/db/sqlalchemy/session.py b/nova/openstack/common/db/sqlalchemy/session.py
index be1a78a4c0..49fc4a47b9 100644
--- a/nova/openstack/common/db/sqlalchemy/session.py
+++ b/nova/openstack/common/db/sqlalchemy/session.py
@@ -611,7 +611,8 @@ def _is_db_connection_error(args):
"""Return True if error in connecting to db."""
# NOTE(adam_g): This is currently MySQL specific and needs to be extended
# to support Postgres and others.
- conn_err_codes = ('2002', '2003', '2006')
+ # For the db2, the error code is -30081 since the db2 is still not ready
+ conn_err_codes = ('2002', '2003', '2006', '-30081')
for err_code in conn_err_codes:
if args.find(err_code) != -1:
return True