diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-26 08:29:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-10-26 08:29:53 +0000 |
commit | d608b19e0d3b3f4d84fcfcdd72bb7e64c86b6f01 (patch) | |
tree | 8c283d1c81d718e64d87d9a2d1132c89f3915939 /collectors/python.d.plugin/python_modules/bases | |
parent | Releasing debian version 1.18.0-1. (diff) | |
download | netdata-d608b19e0d3b3f4d84fcfcdd72bb7e64c86b6f01.tar.xz netdata-d608b19e0d3b3f4d84fcfcdd72bb7e64c86b6f01.zip |
Merging upstream version 1.18.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py | 2 | ||||
-rw-r--r-- | collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py | 18 |
2 files changed, 15 insertions, 5 deletions
diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py index 088bf119e..4dfd226b0 100644 --- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py +++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py @@ -230,7 +230,7 @@ class SimpleService(PythonDLimitedLogger, object): continue elif self.charts.cleanup and chart.penalty >= self.charts.cleanup: chart.obsolete() - self.error("chart '{0}' was suppressed due to non updating".format(chart.name)) + self.info("chart '{0}' was suppressed due to non updating".format(chart.name)) continue ok = chart.update(data, interval) diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py index 3b94fcdf2..337bf57d8 100644 --- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py +++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py @@ -14,6 +14,12 @@ except ImportError: else: _TLS_SUPPORT = True +if _TLS_SUPPORT: + try: + PROTOCOL_TLS = ssl.PROTOCOL_TLS + except AttributeError: + PROTOCOL_TLS = ssl.PROTOCOL_SSLv23 + from bases.FrameworkServices.SimpleService import SimpleService @@ -80,15 +86,18 @@ class SocketService(SimpleService): if self.tls: try: self.debug('Encapsulating socket with TLS') + self.debug('Using keyfile: {0}, certfile: {1}, cert_reqs: {2}, ssl_version: {3}'.format( + self.key, self.cert, ssl.CERT_NONE, PROTOCOL_TLS + )) self._sock = ssl.wrap_socket(self._sock, keyfile=self.key, certfile=self.cert, server_side=False, cert_reqs=ssl.CERT_NONE, - ssl_version=ssl.PROTOCOL_TLS, + ssl_version=PROTOCOL_TLS, ) - except (socket.error, ssl.SSLError) as error: - self.error('failed to wrap socket : {0}'.format(error)) + except (socket.error, ssl.SSLError, IOError, OSError) as error: + self.error('failed to wrap socket : {0}'.format(repr(error))) self._disconnect() self.__socket_config = None return False @@ -167,7 +176,8 @@ class SocketService(SimpleService): if self._connect2socket(res): break - except Exception: + except Exception as error: + self.error('unhandled exception during connect : {0}'.format(repr(error))) self._sock = None self.__socket_config = None |