dev_1.0.0_yuyr_2:重新提交 PR,增加 master/agent 以及系统集成测试 (#17)
Reviewed-on: #17 Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn> Reviewed-by: xuxt <xuxt@zgclab.edu.cn>
This commit was merged in pull request #17.
This commit is contained in:
@@ -4,8 +4,22 @@ set -euo pipefail
|
||||
# 获取fluent-bit-host02容器名称
|
||||
container_name="logging-mvp-fluent-bit-host02-1"
|
||||
|
||||
# 检查容器是否存在并运行
|
||||
if ! docker ps | grep -q "$container_name"; then
|
||||
wait_for_container() {
|
||||
local name="$1"
|
||||
local attempts=30
|
||||
local delay=5
|
||||
local i
|
||||
for ((i = 1; i <= attempts; i++)); do
|
||||
if docker ps --format '{{.Names}}' | grep -Fx "$name" >/dev/null; then
|
||||
return 0
|
||||
fi
|
||||
echo "[INFO] 等待容器 $name 启动中... ($i/$attempts)"
|
||||
sleep "$delay"
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
if ! wait_for_container "$container_name"; then
|
||||
echo "[ERROR] Fluent Bit容器 $container_name 未运行"
|
||||
exit 1
|
||||
fi
|
||||
@@ -24,4 +38,4 @@ docker exec "$container_name" sh -c "printf '%s INFO [host02] inference complete
|
||||
|
||||
echo "[OK] 已通过docker exec写入测试日志到 host02 容器内:"
|
||||
echo " - /logs/train/train-demo.log"
|
||||
echo " - /logs/infer/infer-demo.log"
|
||||
echo " - /logs/infer/infer-demo.log"
|
||||
|
||||
Reference in New Issue
Block a user