fix(guanghu-os): tolerate bounded release tunnel handoff

This commit is contained in:
冰朔 2026-09-04 02:26:41 +08:00
commit f3d204a724
2 changed files with 6 additions and 5 deletions

View file

@ -8,7 +8,7 @@ readonly NODE_ID=JD-FD-PRIMARY
readonly INSTANCE_ID=f3d4b730-7f02-452f-975b-7091a4800431 readonly INSTANCE_ID=f3d4b730-7f02-452f-975b-7091a4800431
readonly ROOT_UUID=9e4550a0-452b-4f28-b5a5-d5364aa450f6 readonly ROOT_UUID=9e4550a0-452b-4f28-b5a5-d5364aa450f6
readonly LINUX_RESCUE_ENTRY=gnulinux-simple-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 STATE_ROOT=/run/guanghu/master
readonly RECEIPT_ROOT=/guanghu/recovery/JD-FD-PRIMARY-master-20260816 readonly RECEIPT_ROOT=/guanghu/recovery/JD-FD-PRIMARY-master-20260816
readonly LOG_ROOT=${RECEIPT_ROOT}/runtime-logs readonly LOG_ROOT=${RECEIPT_ROOT}/runtime-logs
@ -125,8 +125,8 @@ start_guanghu() {
} }
require_listen() { require_listen() {
local name=$1 port=$2 local name=$1 port=$2 attempts=${3:-5}
for _ in 1 2 3 4 5; do for ((attempt=1; attempt<=attempts; attempt++)); do
listen_ready "$port" && return 0 listen_ready "$port" && return 0
sleep 1 sleep 1
done done
@ -243,7 +243,7 @@ runtime_watch() {
require_listen navigation 3922 require_listen navigation 3922
require_listen pncc_zhuyuan "$PNCC_ZHUYUAN_PORT" require_listen pncc_zhuyuan "$PNCC_ZHUYUAN_PORT"
require_listen pncc_chengyan "$PNCC_CHENGYAN_PORT" require_listen pncc_chengyan "$PNCC_CHENGYAN_PORT"
require_listen hololake_release 3940 require_listen hololake_release 3940 120
done done
} }

View file

@ -40,7 +40,8 @@ grep -Fq '"personaId":"ICE-P-ZY001"' "$subject"
grep -Fq '"personaId":"ICE-P-CY0903"' "$subject" grep -Fq '"personaId":"ICE-P-CY0903"' "$subject"
grep -Fq 'start_root hololake-release-bridge "$HOLOLAKE_RELEASE_BRIDGE"' "$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 '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 'readonly LOG_ROOT=${RECEIPT_ROOT}/runtime-logs' "$subject"
grep -Fq 'supervise_root "$name" "$@" &' "$subject" grep -Fq 'supervise_root "$name" "$@" &' "$subject"
grep -Fq 'supervise_guanghu "$name" "$@" &' "$subject" grep -Fq 'supervise_guanghu "$name" "$@" &' "$subject"