Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
Description
When using TCP transport (SSL) the master logs might get flooded by these errors:
2022-05-11 00:29:32,231 [tornado.general :555 ][ERROR ][1707] Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 520, in _handle_events
self._handle_read()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 1396, in _handle_read
self._do_ssl_handshake()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 1316, in _do_ssl_handshake
self.socket.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1036, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 648, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
2022-05-11 00:29:32,232 [tornado.application:640 ][ERROR ][1707] Exception in callback None
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/ioloop.py", line 890, in start
handler_func(fd_obj, events)
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/stack_context.py", line 278, in null_wrapper
return fn(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 520, in _handle_events
self._handle_read()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 1396, in _handle_read
self._do_ssl_handshake()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 1316, in _do_ssl_handshake
self.socket.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1036, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 648, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
Errno 0 is being raised incorrectly here and it should be fixed in newer versions of Python (https://bugs.python.org/issue31122) but the bug is present on Python 3.6 which is still the default in RHEL 8 for example.
I am not entirely sure if this fix only prevents logs being flooded or even fixes some memory leak a little bit as the memory usage of salt-master became more stable after deploying the fix.
Description When using TCP transport (SSL) the master logs might get flooded by these errors:
Errno 0 is being raised incorrectly here and it should be fixed in newer versions of Python (https://bugs.python.org/issue31122) but the bug is present on Python 3.6 which is still the default in RHEL 8 for example.
I am not entirely sure if this fix only prevents logs being flooded or even fixes some memory leak a little bit as the memory usage of salt-master became more stable after deploying the fix.
This is basically just a copy of https://github.com/tornadoweb/tornado/pull/2518/files#diff-15c0dbe9be844d2630a4a3fc39215fcbb1734d09ff8c379b0cdb951c82ad989b.
Setup Salt-master with TCP transport and SSL enabled
Steps to Reproduce the behavior Should happen when salt-minion closes connection unexpectedly.
Expected behavior The exception gets caught.
Versions Report