diff options
author | Xavier Queralt <xqueralt@redhat.com> | 2014-02-12 12:49:26 +0100 |
---|---|---|
committer | Xavier Queralt <xqueralt@redhat.com> | 2014-02-12 12:51:05 +0100 |
commit | b09ccd55bd7e67f4351d0cc4f6c6bbcef40f0c41 (patch) | |
tree | 1cf5001ccc410a321fbf3fa7eb0fc7231f65e09c | |
parent | 2bb8ce82791effea031ffa620d37574d307f7c4f (diff) | |
download | nova-b09ccd55bd7e67f4351d0cc4f6c6bbcef40f0c41.tar.gz |
Don't raise MySQL 2013 'Lost connection' errors
Although this code error is part of the `ping_listener` tests, it
missing from the list of known - and ignored - connection errors.
The code error 2013 refers to a connection lost during a query, see:
https://dev.mysql.com/doc/refman/5.0/en/error-messages-client.html#error_cr_server_lost
Without this error code, the session won't try to reconnect to mysql,
which makes `max_retries` useless.
Closes-bug: #1276510
Change-Id: If2667cf83ac656666ffe00aa90e3454516b080db
-rw-r--r-- | nova/openstack/common/db/sqlalchemy/session.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/openstack/common/db/sqlalchemy/session.py b/nova/openstack/common/db/sqlalchemy/session.py index 49fc4a47b9..f23581786a 100644 --- a/nova/openstack/common/db/sqlalchemy/session.py +++ b/nova/openstack/common/db/sqlalchemy/session.py @@ -612,7 +612,7 @@ def _is_db_connection_error(args): # NOTE(adam_g): This is currently MySQL specific and needs to be extended # to support Postgres and others. # For the db2, the error code is -30081 since the db2 is still not ready - conn_err_codes = ('2002', '2003', '2006', '-30081') + conn_err_codes = ('2002', '2003', '2006', '2013', '-30081') for err_code in conn_err_codes: if args.find(err_code) != -1: return True |