From f3d204a724127f27b4368f790dcb9202b2c72610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Fri, 4 Sep 2026 02:26:41 +0800 Subject: [PATCH] fix(guanghu-os): tolerate bounded release tunnel handoff --- .../guanghu-os/scripts/guanghu-master-init.sh | 8 ++++---- .../guanghu-os/scripts/test-guanghu-master-init.sh | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh b/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh index 40fedea3d..ecc3dedbd 100644 --- a/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh +++ b/product-source/hololake-platform/guanghu-os/scripts/guanghu-master-init.sh @@ -8,7 +8,7 @@ readonly NODE_ID=JD-FD-PRIMARY readonly INSTANCE_ID=f3d4b730-7f02-452f-975b-7091a4800431 readonly ROOT_UUID=9e4550a0-452b-4f28-b5a5-d5364aa450f6 readonly LINUX_RESCUE_ENTRY=gnulinux-simple-9e4550a0-452b-4f28-b5a5-d5364aa450f6 -readonly RELEASE_ID=guanghu-master-20260904.3 +readonly RELEASE_ID=guanghu-master-20260904.4 readonly STATE_ROOT=/run/guanghu/master readonly RECEIPT_ROOT=/guanghu/recovery/JD-FD-PRIMARY-master-20260816 readonly LOG_ROOT=${RECEIPT_ROOT}/runtime-logs @@ -125,8 +125,8 @@ start_guanghu() { } require_listen() { - local name=$1 port=$2 - for _ in 1 2 3 4 5; do + local name=$1 port=$2 attempts=${3:-5} + for ((attempt=1; attempt<=attempts; attempt++)); do listen_ready "$port" && return 0 sleep 1 done @@ -243,7 +243,7 @@ runtime_watch() { require_listen navigation 3922 require_listen pncc_zhuyuan "$PNCC_ZHUYUAN_PORT" require_listen pncc_chengyan "$PNCC_CHENGYAN_PORT" - require_listen hololake_release 3940 + require_listen hololake_release 3940 120 done } diff --git a/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh b/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh index 8cb8678aa..31cde0af8 100644 --- a/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh +++ b/product-source/hololake-platform/guanghu-os/scripts/test-guanghu-master-init.sh @@ -40,7 +40,8 @@ grep -Fq '"personaId":"ICE-P-ZY001"' "$subject" grep -Fq '"personaId":"ICE-P-CY0903"' "$subject" grep -Fq 'start_root hololake-release-bridge "$HOLOLAKE_RELEASE_BRIDGE"' "$subject" grep -Fq 'wait_http hololake-release-broadcast http://127.0.0.1:3940/health 200 30' "$subject" -grep -Fq 'require_listen hololake_release 3940' "$subject" +grep -Fq 'local name=$1 port=$2 attempts=${3:-5}' "$subject" +grep -Fq 'require_listen hololake_release 3940 120' "$subject" grep -Fq 'readonly LOG_ROOT=${RECEIPT_ROOT}/runtime-logs' "$subject" grep -Fq 'supervise_root "$name" "$@" &' "$subject" grep -Fq 'supervise_guanghu "$name" "$@" &' "$subject"