Skip to content

Commit

Permalink
Reduce log level for k8s TCP_KEEPALIVE etc warnings (#26981)
Browse files Browse the repository at this point in the history
(cherry picked from commit 40d19b9)
  • Loading branch information
dstandish authored and ephraimbuddy committed Nov 9, 2022
1 parent febf355 commit e4d842b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions airflow/kubernetes/kube_client.py
Expand Up @@ -68,17 +68,17 @@ def _enable_tcp_keepalive() -> None:
if hasattr(socket, "TCP_KEEPIDLE"):
socket_options.append((socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, tcp_keep_idle))
else:
log.warning("Unable to set TCP_KEEPIDLE on this platform")
log.debug("Unable to set TCP_KEEPIDLE on this platform")

if hasattr(socket, "TCP_KEEPINTVL"):
socket_options.append((socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, tcp_keep_intvl))
else:
log.warning("Unable to set TCP_KEEPINTVL on this platform")
log.debug("Unable to set TCP_KEEPINTVL on this platform")

if hasattr(socket, "TCP_KEEPCNT"):
socket_options.append((socket.IPPROTO_TCP, socket.TCP_KEEPCNT, tcp_keep_cnt))
else:
log.warning("Unable to set TCP_KEEPCNT on this platform")
log.debug("Unable to set TCP_KEEPCNT on this platform")

HTTPSConnection.default_socket_options = HTTPSConnection.default_socket_options + socket_options
HTTPConnection.default_socket_options = HTTPConnection.default_socket_options + socket_options
Expand Down

0 comments on commit e4d842b

Please sign in to comment.