From b3aea7880f96566b6a2297a2a91dba1ddf5f9ca1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 10 Jun 2026 11:21:25 +0800 Subject: [PATCH] =?UTF-8?q?docs(deploy):=20update.sh=20restart=20=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=8F=90=E7=A4=BA=20drain=20=E6=9C=9F=E4=BC=9A?= =?UTF-8?q?=E7=AD=89=E5=87=A0=E5=8D=81=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemctl restart 同步阻塞、honors unit TimeoutStopSec,功能无需改; 仅补一行日志,避免操作者把 drain 等待误判为卡死。 Co-Authored-By: Claude Opus 4.8 (1M context) --- deploy/update.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/update.sh b/deploy/update.sh index 4497d65..9584d76 100755 --- a/deploy/update.sh +++ b/deploy/update.sh @@ -152,7 +152,9 @@ else fi # ── 5) 重启 service(在 build 之后!)─────────────────────────── -log "systemctl restart $SERVICE ..." +# 优雅 drain:若有在跑的 run,restart 会先等它们收尾(≤ unit TimeoutStopSec, +# 见 RUN.md / config/agent.yaml shutdown 段)再换新版 —— 这步"看着卡住"几十秒是正常的。 +log "systemctl restart $SERVICE(有在跑的 run 会先 drain,可能等几十秒)..." systemctl restart "$SERVICE" # ── 6) 验活 ───────────────────────────────────────────────────