Why: C4 and C5 need a shared way to start, refuse, and tear down stacks without touching production ports or processes. Evidence: tests/ops/self_check.sh passed (help, unknown arg, foreign name, production port, busy port, SIGINT cleanup). drill_driver go test passed. Impact: New tests/ops library and HTTP driver. No drill result and no release-gate change yet. Refs: docs/release-multi-instance.md C4 C5 Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
894 B
Markdown
21 lines
894 B
Markdown
# U7 运维演练(C4 / C5)
|
||
|
||
只打隔离栈。实例名必须以 `u7drill` 或 `u7bk` 开头,端口必须落在 18980–18999。
|
||
脚本只按自己的 pidfile 结束进程,并且先核对命令行里有本演练的数据目录或端口。
|
||
|
||
| 文件 | 职责 |
|
||
|---|---|
|
||
| `lib.sh` | 隔离 PG / Redis / serve 的创建、回收、端口与名称守卫 |
|
||
| `drill_driver/` | 时间线、幂等重放、SSE seq、标记写入、工件、限流突发、权限核对 |
|
||
| `run_fault_drill.sh` | C4:`pg-stop`、`pg-kill`、`redis-kill` |
|
||
| `run_backup_drill.sh` | C5:物理备份 + WAL/PITR,以及 pg_dump,恢复到新目标 |
|
||
|
||
```bash
|
||
tests/ops/self_check.sh
|
||
tests/ops/run_fault_drill.sh --fault all
|
||
tests/ops/run_backup_drill.sh
|
||
```
|
||
|
||
结果在 `results/<ts>/`(gitignore)。证据以 `make evidence` 记入任务卡,来源是 SELF。
|
||
本入口不放行第二实例写流量。
|