fix(ops): 磁盘写满事故收口——备份预检按模式取阈值、残档即删
生产全站 502 约 5.5 小时、Gitea 500 约 13 小时,根因是 / 写到 100%(20G/20G)。 仓库侧落这四处;另三处守卫在服务器侧脚本(未入仓,已在 runbook §7.3 登记)。 - backup-cicd.sh:预检阈值必须与本轮实际开销绑定。原 .env 把 MIN_FREE_GB 从 3 降到 1, 于是 2GB 可用时放行了一次要写 2.6GB 的全量导出,tar 写到 2.0GB 撞盘。改为含仓库导出时 上调至 BACKUP_FULL_MIN_FREE_GB(默认 4GB),thin 仍按 1GB —— 一并抬高等于又关掉 「唯一副本、不可重建」的那份 DB 备份,是同一个错法的两个方向。 - backup-cicd.sh:归档失败即删残档。半截归档把一次备份失败升级成了全站故障, 且 set -e 让末尾的保留清理从未执行,形成「失败越多越容易满盘」的正反馈。 - backup-cicd.sh:Jenkins 容器缺失时只在预检记录并跳过第 [3/3] 步。原先的 require_container 会让整轮备份(含 Gitea DB dump)在预检阶段就中止。 - nginx-static-production.conf:upstream jenkins_app 后端置 127.0.0.1:1 down。 Jenkins 下线后 `server jenkins:8080` 让 nginx -t 报 host not found, 而修 502 正需要 reload,形成死锁。保留结构以便一行还原。 - runbook §7:复发时的四步判据(盘满时 docker ps 读数不可信)、已落地守卫表、9 项未闭环。 - lessons §5.53:诊断仪器在故障态下自身会失真这一族。§5.52 空号是他人未落库的在途段。
This commit is contained in:
1 parent
03be1c9e36
commit
54783f4068
4 files changed
+138
-5
No files matched your search
@@ -78,7 +78,7 @@ http {
|
||||
}
|
||||
|
||||
upstream jenkins_app {
|
||||
server jenkins:8080;
|
||||
server 127.0.0.1:1 down; # jenkins decommissioned 2026-11-01, restore to jenkins:8080 when re-enabled
|
||||
}
|
||||
|
||||
upstream novavis_authority {
|
||||
|
||||
Reference in new issue
Block a user