You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"$(date -u +"${ts_format}") [${probe_name}] - There is no configured HUB/ROUTER host or SE_NODE_GRID_URL isn't set. ${probe_name} ignores to send drain request to upstream."
57
60
fi
@@ -63,28 +66,38 @@ function signal_node_to_drain() {
63
66
}
64
67
65
68
if curl --noproxy "*" -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status >${tmp_node_file};then
echo"$(date -u +"${ts_format}") [${probe_name}] - Fetch the Node status via cURL with exit status: ${endpoint_status}, HTTP code: ${endpoint_http_code}"
echo"$(date -u +"${ts_format}") [${probe_name}] - Node endpoint returned status ${endpoint_http_code}, attempt one more time to confirm the status."
92
+
check_attempts=$((check_attempts+1))
93
+
if [ ${check_attempts}-ge 3 ];then
94
+
echo"$(date -u +"${ts_format}") [${probe_name}] - Node endpoint returned status ${endpoint_http_code} for serveral times. Assume that Node is ready to be terminated."
95
+
exit 0
96
+
fi
97
+
sleep 2;
86
98
else
87
-
echo"$(date -u +"${ts_format}") [${probe_name}] - Node ${probe_name} is waiting for current session on slot ${SLOT_HAS_SESSION} to be finished. Node details: message: $(jq -r '.value.message'${tmp_node_file}||"unknown"), availability: $(jq -r '.value.node.availability'${tmp_node_file}||"unknown")"
99
+
check_attempts=0
100
+
echo"$(date -u +"${ts_format}") [${probe_name}] - Node is waiting for ${SLOT_HAS_SESSION} session(s) to be finished. Node details: message: $(jq -r '.value.message'"${tmp_node_file}"||echo"unknown"), availability: $(jq -r '.value.node.availability'"${tmp_node_file}"||echo"unknown")"
Copy file name to clipboardExpand all lines: charts/selenium-grid/configs/node/nodeProbe.sh
+12-6
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,12 @@ function help_message() {
27
27
echo"$(date -u +"${ts_format}") [${probe_name}] - If you believe Node is registered successfully but probe still report this message and fail for a long time. Workaround by set 'global.seleniumGrid.defaultNodeStartupProbe' to 'httpGet' and report us an issue for Chart improvement with your scenario."
28
28
}
29
29
30
-
if curl --noproxy "*" -m ${max_time} -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status -o ${tmp_node_file};then
echo"$(date -u +"${ts_format}") [${probe_name}] - Node responds the ID: ${NODE_ID} with status: ${NODE_STATUS}"
35
+
echo"$(date -u +"${ts_format}") [${probe_name}] - Node responds the ID: ${NODE_ID} with status: ${NODE_STATUS}. Number of ongoing sessions: ${SLOT_HAS_SESSION}"
35
36
else
36
37
echo"$(date -u +"${ts_format}") [${probe_name}] - Wait for the Node to report its status"
echo"$(date -u +"${ts_format}") [${probe_name}] - There is no configured HUB/ROUTER host or SE_NODE_GRID_URL isn't set. ${probe_name} will not work as expected."
echo"$(date -u +"${ts_format}") [${probe_name}] - Node ID: ${NODE_ID} report its status, but could not double check ID in Hub. Assume that Node is ready."
69
+
exit 0
64
70
else
65
71
echo"$(date -u +"${ts_format}") [${probe_name}] - Node ID: ${NODE_ID} is not found in the Grid. Node is not ready."
0 commit comments