Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Icehouse
openstack-keystone
robust-detection-for-postgresql-connection-erro...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File robust-detection-for-postgresql-connection-errors.patch of Package openstack-keystone
diff --git a/keystone/openstack/common/db/sqlalchemy/session.py b/keystone/openstack/common/db/sqlalchemy/session.py index 87da4eb..f3040c7 100644 --- a/keystone/openstack/common/db/sqlalchemy/session.py +++ b/keystone/openstack/common/db/sqlalchemy/session.py @@ -502,7 +502,9 @@ def _ping_listener(engine, dbapi_conn, connection_rec, connection_proxy): ping_sql = 'select 1 from (values (1)) AS t1' cursor.execute(ping_sql) except Exception as ex: - if engine.dialect.is_disconnect(ex, dbapi_conn, cursor): + if (engine.dialect.is_disconnect(ex, dbapi_conn, cursor) or + ('unknown error' in str(ex).partition('\n')[0] and + getattr(dbapi_conn, 'closed', False))): msg = _LW('Database server has gone away: %s') % ex LOG.warning(msg)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor