docs: add disk capacity incident runbook (Closes #1287)
This commit is contained in:
parent
881653eef1
commit
1b448fef23
|
|
@ -23,3 +23,20 @@
|
|||
- API contracts + versioning
|
||||
- independent deployability
|
||||
- observability: metrics, traces, structured logs
|
||||
|
||||
# Disk capacity incident
|
||||
|
||||
Root filesystem usage at or above 85% is an operations incident.
|
||||
|
||||
1. Capture the initial state with `df -h / /var/lib/gitea`.
|
||||
2. Inspect directory sizes and active processes before cleanup. Reclaim only
|
||||
disposable caches and abandoned temporary environments. Responders must not
|
||||
delete Gitea data, repositories, databases, secrets, or active release
|
||||
artifacts.
|
||||
3. Re-run `df -h / /var/lib/gitea`; usage must be below 85%.
|
||||
4. Confirm the release path with `systemctl is-active gitea act_runner`, then run
|
||||
the repository test suite.
|
||||
|
||||
Record the before and after usage in the incident ticket. If safe cleanup cannot
|
||||
restore capacity below 85%, keep the incident open and escalate storage
|
||||
expansion rather than removing durable data.
|
||||
|
|
|
|||
16
tests/test_ops_fundamentals.py
Normal file
16
tests/test_ops_fundamentals.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from pathlib import Path
|
||||
|
||||
|
||||
RUNBOOK = Path(__file__).parents[1] / "docs" / "ops-fundamentals.md"
|
||||
|
||||
|
||||
def test_disk_capacity_runbook_requires_safe_remediation_and_release_verification():
|
||||
text = " ".join(RUNBOOK.read_text().split())
|
||||
|
||||
assert "Disk capacity incident" in text
|
||||
assert "85%" in text
|
||||
assert "df -h / /var/lib/gitea" in text
|
||||
assert "disposable caches and abandoned temporary environments" in text
|
||||
assert "must not delete Gitea data" in text
|
||||
assert "systemctl is-active gitea act_runner" in text
|
||||
assert "repository test suite" in text
|
||||
Loading…
Reference in New Issue
Block a user