@@ -49,7 +49,7 @@ function get_grid_url() {
49
49
SE_SUB_PATH=" "
50
50
fi
51
51
grid_url=${SE_SERVER_PROTOCOL} ://${SE_BASIC_AUTH}${SE_HUB_HOST:- $SE_ROUTER_HOST } :${SE_HUB_PORT:- $SE_ROUTER_PORT }${SE_SUB_PATH}
52
- grid_url_checks=$( curl -m ${max_time} -s -o /dev/null -w " %{http_code}" ${grid_url} )
52
+ grid_url_checks=$( curl --noproxy " * " - m ${max_time} -s -o /dev/null -w " %{http_code}" ${grid_url} )
53
53
if [ " ${grid_url_checks} " = " 401" ]; then
54
54
echo " $( date +%FT%T%Z) [${probe_name} ] - Host requires Basic Auth. Please add the credentials to the SE_BASIC_AUTH variable (e.g: user:password). preStop ignores to send drain request to upstream."
55
55
grid_url=" "
@@ -62,7 +62,7 @@ function get_grid_url() {
62
62
function signal_distributor_to_drain_node() {
63
63
if [ " ${DISTRIBUTED_MODE} " = true ]; then
64
64
echo " $( date +%FT%T%Z) [${probe_name} ] - Signaling Distributor to drain node"
65
- curl -m ${max_time} -k -X POST ${SE_SERVER_PROTOCOL} ://${SE_DISTRIBUTOR_HOST} :${SE_DISTRIBUTOR_PORT} /se/grid/distributor/node/${NODE_ID} /drain --header " ${HEADERS} "
65
+ curl --noproxy " * " - m ${max_time} -k -X POST ${SE_SERVER_PROTOCOL} ://${SE_DISTRIBUTOR_HOST} :${SE_DISTRIBUTOR_PORT} /se/grid/distributor/node/${NODE_ID} /drain --header " ${HEADERS} "
66
66
fi
67
67
}
68
68
@@ -71,17 +71,17 @@ function signal_hub_to_drain_node() {
71
71
get_grid_url
72
72
if [ -n " ${grid_url} " ]; then
73
73
echo " $( date +%FT%T%Z) [${probe_name} ] - Signaling Hub to drain node"
74
- curl -m ${max_time} -k -X POST ${grid_url} /se/grid/distributor/node/${NODE_ID} /drain --header " ${HEADERS} "
74
+ curl --noproxy " * " - m ${max_time} -k -X POST ${grid_url} /se/grid/distributor/node/${NODE_ID} /drain --header " ${HEADERS} "
75
75
fi
76
76
fi
77
77
}
78
78
79
79
function signal_node_to_drain() {
80
80
echo " $( date +%FT%T%Z) [${probe_name} ] - Signaling Node to drain itself"
81
- curl -m ${max_time} -k -X POST ${SE_SERVER_PROTOCOL} ://127.0.0.1:${SE_NODE_PORT} /se/grid/node/drain --header " ${HEADERS} "
81
+ curl --noproxy " * " - m ${max_time} -k -X POST ${SE_SERVER_PROTOCOL} ://127.0.0.1:${SE_NODE_PORT} /se/grid/node/drain --header " ${HEADERS} "
82
82
}
83
83
84
- if curl -m ${max_time} -sfk ${SE_SERVER_PROTOCOL} ://127.0.0.1:${SE_NODE_PORT} /status > ${tmp_node_file} ; then
84
+ if curl --noproxy " * " - m ${max_time} -sfk ${SE_SERVER_PROTOCOL} ://127.0.0.1:${SE_NODE_PORT} /status > ${tmp_node_file} ; then
85
85
NODE_ID=$( jq -r ' .value.node.nodeId' ${tmp_node_file} || " " )
86
86
if [ -n " ${NODE_ID} " ]; then
87
87
echo " $( date +%FT%T%Z) [${probe_name} ] - Current Node ID is: ${NODE_ID} "
@@ -93,7 +93,7 @@ if curl -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/st
93
93
# Wait for the current session to be finished if any
94
94
while true ; do
95
95
# Attempt the cURL request and capture the exit status
96
- endpoint_http_code=$( curl --retry ${retry_time} -m ${max_time} -sfk ${SE_SERVER_PROTOCOL} ://127.0.0.1:${SE_NODE_PORT} /status -o ${tmp_node_file} -w " %{http_code}" )
96
+ endpoint_http_code=$( curl --noproxy " * " -- retry ${retry_time} -m ${max_time} -sfk ${SE_SERVER_PROTOCOL} ://127.0.0.1:${SE_NODE_PORT} /status -o ${tmp_node_file} -w " %{http_code}" )
97
97
endpoint_status=$?
98
98
echo " $( date +%FT%T%Z) [${probe_name} ] - Fetch the Node status via cURL with exit status: ${endpoint_status} , HTTP code: ${endpoint_http_code} "
99
99
0 commit comments