mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge pull request #43606 from adk3798/suppress-tls-error
mgr/cephadm: suppress TLSV1_ALERT_DECRYPT_ERROR from cherrypy Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
This commit is contained in:
commit
e9636ddd24
@ -1,6 +1,7 @@
|
||||
import cherrypy
|
||||
import ipaddress
|
||||
import json
|
||||
import logging
|
||||
import socket
|
||||
import ssl
|
||||
import tempfile
|
||||
@ -27,6 +28,18 @@ if TYPE_CHECKING:
|
||||
from cephadm.module import CephadmOrchestrator
|
||||
|
||||
|
||||
def cherrypy_filter(record: logging.LogRecord) -> int:
|
||||
blocked = [
|
||||
'TLSV1_ALERT_DECRYPT_ERROR'
|
||||
]
|
||||
msg = record.getMessage()
|
||||
return not any([m for m in blocked if m in msg])
|
||||
|
||||
|
||||
logging.getLogger('cherrypy.access').addFilter(cherrypy_filter)
|
||||
logging.getLogger('cherrypy.error').addFilter(cherrypy_filter)
|
||||
|
||||
|
||||
class CherryPyThread(threading.Thread):
|
||||
def __init__(self, mgr: "CephadmOrchestrator") -> None:
|
||||
self.mgr = mgr
|
||||
|
Loading…
Reference in New Issue
Block a user