From 95d6491a087ea0b9677577b35108718b8acba2ed Mon Sep 17 00:00:00 2001 From: tmaeno Date: Thu, 26 May 2022 01:30:03 +0200 Subject: [PATCH] 0.0.26 --- PandaPkgInfo.py | 2 +- README.txt | 3 +++ pandacommon/pandautils/net_utils.py | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/PandaPkgInfo.py b/PandaPkgInfo.py index 165d5a1..77e418a 100644 --- a/PandaPkgInfo.py +++ b/PandaPkgInfo.py @@ -1 +1 @@ -release_version = "0.0.26" +release_version = "0.0.27" diff --git a/README.txt b/README.txt index c257e66..503e83a 100644 --- a/README.txt +++ b/README.txt @@ -7,6 +7,9 @@ Includes all libraries used by both server and monitor (and others). Release Note ------------ +* 0.0.27 (26/5/2022) + * PANDA_BEHIND_REAL_LB + * 0.0.26 (25/5/2022) * for containerization diff --git a/pandacommon/pandautils/net_utils.py b/pandacommon/pandautils/net_utils.py index e960234..9ade924 100644 --- a/pandacommon/pandautils/net_utils.py +++ b/pandacommon/pandautils/net_utils.py @@ -1,3 +1,4 @@ +import os import copy import random import socket @@ -62,6 +63,9 @@ def get_connection(self, url, proxies=None): # utility function to get HTTPAdapterWithRandomDnsResolver def get_http_adapter_with_random_dns_resolution(): session = requests.Session() + # no randomization if panda is behind real load balancer than DNS LB + if 'PANDA_BEHIND_REAL_LB' in os.environ: + return session adapter = HTTPAdapterWithRandomDnsResolver(max_retries=0) session.mount('http://', adapter) session.mount('https://', adapter)