Could at least the logic get changed how keystone uses python-ldap? Usecase: I have 4 LDAP Servers configured 3 are down for maintenance. I get alerts with stacktraces like: 2022-08-24 04:06:44.860 7 ERROR keystonemiddleware.auth_token [req-b4703136-ac14-44d5-bc85-665d852cb41e - c512d8855ab44fd7af3d2ad10583d6e4 - 1831760463a0498e8b0b006eff434cf8 1831760463a0498e8b0b006eff434cf8] Bad response code while vali dating token: 504 Gateway Timeout (HTTP 504): keystoneauth1.exceptions.http.GatewayTimeout: Gateway Timeout (HTTP 504) 2022-08-24 04:06:44.860 7 WARNING keystonemiddleware.auth_token [req-b4703136-ac14-44d5-bc85-665d852cb41e - c512d8855ab44fd7af3d2ad10583d6e4 - 1831760463a0498e8b0b006eff434cf8 1831760463a0498e8b0b006eff434cf8] Identity response: < body>

504 Gateway Time-out

The server didn't respond in time. : keystoneauth1.exceptions.http.GatewayTimeout: Gateway Timeout (HTTP 504) 2022-08-24 04:06:44.860 7 CRITICAL keystonemiddleware.auth_token [req-b4703136-ac14-44d5-bc85-665d852cb41e - c512d8855ab44fd7af3d2ad10583d6e4 - 1831760463a0498e8b0b006eff434cf8 1831760463a0498e8b0b006eff434cf8] Unable to validate token: Failed to fetch token data from identity server: keystonemiddleware.auth_token._exceptions.ServiceError: Failed to fetch token data from identity server in octavia. I get this in keystone.log: 2022-08-24 04:07:02.711 31 ERROR ldappool Traceback (most recent call last): 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1196, in _apply_method_s 2022-08-24 04:07:02.711 31 ERROR ldappool return func(self,*args,**kwargs) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 443, in simple_bind_s 2022-08-24 04:07:02.711 31 ERROR ldappool msgid = self.simple_bind(who,cred,serverctrls,clientctrls) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 437, in simple_bind 2022-08-24 04:07:02.711 31 ERROR ldappool return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call 2022-08-24 04:07:02.711 31 ERROR ldappool reraise(exc_type, exc_value, exc_traceback) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise 2022-08-24 04:07:02.711 31 ERROR ldappool raise exc_value 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call 2022-08-24 04:07:02.711 31 ERROR ldappool result = func(*args,**kwargs) 2022-08-24 04:07:02.711 31 ERROR ldappool ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 107, 'info': 'Transport endpoint is not connected'} 2022-08-24 04:07:02.711 31 ERROR ldappool 2022-08-24 04:07:02.711 31 ERROR ldappool During handling of the above exception, another exception occurred: 2022-08-24 04:07:02.711 31 ERROR ldappool 2022-08-24 04:07:02.711 31 ERROR ldappool Traceback (most recent call last): 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldappool/__init__.py", line 266, in _create_connector 2022-08-24 04:07:02.711 31 ERROR ldappool self._bind(conn, bind, passwd) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldappool/__init__.py", line 230, in _bind 2022-08-24 04:07:02.711 31 ERROR ldappool conn.simple_bind_s(bind, passwd) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldappool/__init__.py", line 103, in simple_bind_s 2022-08-24 04:07:02.711 31 ERROR ldappool clientctrls) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1214, in simple_bind_s 2022-08-24 04:07:02.711 31 ERROR ldappool res = self._apply_method_s(SimpleLDAPObject.simple_bind_s,*args,**kwargs) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1200, in _apply_method_s 2022-08-24 04:07:02.711 31 ERROR ldappool self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1168, in reconnect 2022-08-24 04:07:02.711 31 ERROR ldappool self._apply_last_bind() 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1138, in _apply_last_bind 2022-08-24 04:07:02.711 31 ERROR ldappool SimpleLDAPObject.simple_bind_s(self, None, None) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 443, in simple_bind_s 2022-08-24 04:07:02.711 31 ERROR ldappool msgid = self.simple_bind(who,cred,serverctrls,clientctrls) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 437, in simple_bind 2022-08-24 04:07:02.711 31 ERROR ldappool return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call 2022-08-24 04:07:02.711 31 ERROR ldappool reraise(exc_type, exc_value, exc_traceback) 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise 2022-08-24 04:07:02.711 31 ERROR ldappool raise exc_value 2022-08-24 04:07:02.711 31 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call 2022-08-24 04:07:02.711 31 ERROR ldappool result = func(*args,**kwargs) 2022-08-24 04:07:02.711 31 ERROR ldappool ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 107, 'info': 'Transport endpoint is not connected'} 2022-08-24 04:07:02.711 31 ERROR ldappool 2022-08-24 04:07:02.711 30 ERROR ldappool Traceback (most recent call last): 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1196, in _apply_method_s 2022-08-24 04:07:02.711 30 ERROR ldappool return func(self,*args,**kwargs) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 443, in simple_bind_s 2022-08-24 04:07:02.711 30 ERROR ldappool msgid = self.simple_bind(who,cred,serverctrls,clientctrls) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 437, in simple_bind 2022-08-24 04:07:02.711 30 ERROR ldappool return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call 2022-08-24 04:07:02.711 30 ERROR ldappool reraise(exc_type, exc_value, exc_traceback) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise 2022-08-24 04:07:02.711 30 ERROR ldappool raise exc_value 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call 2022-08-24 04:07:02.711 30 ERROR ldappool result = func(*args,**kwargs) 2022-08-24 04:07:02.711 30 ERROR ldappool ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 107, 'info': 'Transport endpoint is not connected'} 2022-08-24 04:07:02.711 30 ERROR ldappool 2022-08-24 04:07:02.711 30 ERROR ldappool During handling of the above exception, another exception occurred: 2022-08-24 04:07:02.711 30 ERROR ldappool 2022-08-24 04:07:02.711 30 ERROR ldappool Traceback (most recent call last): 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldappool/__init__.py", line 266, in _create_connector 2022-08-24 04:07:02.711 30 ERROR ldappool self._bind(conn, bind, passwd) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldappool/__init__.py", line 230, in _bind 2022-08-24 04:07:02.711 30 ERROR ldappool conn.simple_bind_s(bind, passwd) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldappool/__init__.py", line 103, in simple_bind_s 2022-08-24 04:07:02.711 30 ERROR ldappool clientctrls) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1214, in simple_bind_s 2022-08-24 04:07:02.711 30 ERROR ldappool res = self._apply_method_s(SimpleLDAPObject.simple_bind_s,*args,**kwargs) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1200, in _apply_method_s 2022-08-24 04:07:02.711 30 ERROR ldappool self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1168, in reconnect 2022-08-24 04:07:02.711 30 ERROR ldappool self._apply_last_bind() 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1138, in _apply_last_bind 2022-08-24 04:07:02.711 30 ERROR ldappool SimpleLDAPObject.simple_bind_s(self, None, None) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 443, in simple_bind_s 2022-08-24 04:07:02.711 30 ERROR ldappool msgid = self.simple_bind(who,cred,serverctrls,clientctrls) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 437, in simple_bind 2022-08-24 04:07:02.711 30 ERROR ldappool return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call 2022-08-24 04:07:02.711 30 ERROR ldappool reraise(exc_type, exc_value, exc_traceback) 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise 2022-08-24 04:07:02.711 30 ERROR ldappool raise exc_value 2022-08-24 04:07:02.711 30 ERROR ldappool File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call 2022-08-24 04:07:02.711 30 ERROR ldappool result = func(*args,**kwargs) 2022-08-24 04:07:02.711 30 ERROR ldappool ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 107, 'info': 'Transport endpoint is not connected'}