Copilot commented on code in PR #55548:
URL: https://github.com/apache/doris/pull/55548#discussion_r2313674771
##########
docker/runtime/fe/resource/fe_disaggregated_probe.sh:
##########
@@ -42,21 +42,31 @@ function alive_probe()
fi
}
-function ready_probe()
-{
+function ready_probe() {
local http_port=$(parse_config_file_with_key "http_port")
http_port=${http_port:=$DEFAULT_HTTP_PORT}
- local ip=`hostname -i | awk '{print $1}'`
- local url="http://${ip}:${http_port}/api/health"
- local res=$(curl -s $url)
- local code=$(jq -r ".code" <<< $res)
- if [[ "x$code" == "x0" ]]; then
+ if netstat -lntp | grep ":$http_port" > /dev/null ; then
exit 0
else
exit 1
fi
}
+#function ready_probe()
+#{
+# local http_port=$(parse_config_file_with_key "http_port")
+# http_port=${http_port:=$DEFAULT_HTTP_PORT}
+# local ip=`hostname -i | awk '{print $1}'`
+# local url="http://${ip}:${http_port}/api/health"
+# local res=$(curl -s $url)
+# local code=$(jq -r ".code" <<< $res)
+# if [[ "x$code" == "x0" ]]; then
+# exit 0
+# else
+# exit 1
+# fi
+#}
+#
Review Comment:
[nitpick] Consider removing the commented-out code block instead of keeping
it. If this implementation needs to be restored later, it can be retrieved from
version control history.
```suggestion
```
##########
docker/runtime/be/resource/be_disaggregated_probe.sh:
##########
@@ -42,21 +42,31 @@ function alive_probe()
fi
}
-function ready_probe()
-{
+function ready_probe() {
local webserver_port=$(parse_config_file_with_key "webserver_port")
webserver_port=${webserver_port:=$DEFAULT_WEBSERVER_PORT}
- local ip=`hostname -i | awk '{print $1}'`
- local url="http://${ip}:${webserver_port}/api/health"
- local res=$(curl -s $url)
- local status=$(jq -r ".status" <<< $res)
- if [[ "x$status" == "xOK" ]]; then
+ if netstat -lntp | grep ":$webserver_port" > /dev/null ; then
exit 0
else
exit 1
fi
}
+#function ready_probe()
+#{
+# local webserver_port=$(parse_config_file_with_key "webserver_port")
+# webserver_port=${webserver_port:=$DEFAULT_WEBSERVER_PORT}
+# local ip=`hostname -i | awk '{print $1}'`
+# local url="http://${ip}:${webserver_port}/api/health"
+# local res=$(curl -s $url)
+# local status=$(jq -r ".status" <<< $res)
+# if [[ "x$status" == "xOK" ]]; then
+# exit 0
+# else
+# exit 1
+# fi
+#}
Review Comment:
[nitpick] Consider removing the commented-out code block instead of keeping
it. If this implementation needs to be restored later, it can be retrieved from
version control history.
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]