Skip to content

Commit 4a44103

Browse files
Ubuntuclaude
andcommitted
feat: DevOps Error Library β€” 167 errors, search tooling, CI
The open-source knowledge base of real DevOps, Cloud, Kubernetes, Docker, Terraform and OpenStack errors. Every error is one Markdown document with a fixed 14-section structure (Error Message β†’ Tags), realistic production logs, read-only diagnostic commands, root-cause analysis, fixes, prevention and references. Contents: - 167 documented errors across 14 technologies (Kubernetes, Docker, Terraform, OpenStack [nova/cinder/neutron/glance/keystone/heat/horizon/swift/placement/ ironic], Linux, GitLab CI, Prometheus, Grafana, RabbitMQ, Redis, PostgreSQL, MySQL, Ceph, Linstor), architected to scale to 10,000+. - `errlib` CLI (PyYAML-only): search by message/keyword/technology/tag/severity, validate every doc (front matter + 14 sections + slugs), build a JSON index, scaffold new errors, and report stats. - Generated per-category indexes + ERROR_TEMPLATE.md. - GitHub Actions CI: ruff, validate, pytest (17 tests), build search index, link check. Issue/PR templates. CONTRIBUTING + ROADMAP. - Content licensed CC BY 4.0 (LICENSE); code MIT (LICENSE-CODE). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a3c8fd7 commit 4a44103

206 files changed

Lines changed: 26597 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Contributing guide
4+
url: https://github.com/devopsaitoolkit/devops-error-library/blob/main/CONTRIBUTING.md
5+
about: How to add or improve an error document.
6+
- name: DevOps troubleshooting guides
7+
url: https://devopsaitoolkit.com/blog
8+
about: Long-form tutorials and troubleshooting walkthroughs.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "πŸ›  Correction or improvement"
2+
description: "Fix or improve an existing error document."
3+
title: "[fix] <error slug>"
4+
labels: ["correction"]
5+
body:
6+
- type: input
7+
id: slug
8+
attributes:
9+
label: Error slug / path
10+
description: e.g. errors/kubernetes/kubernetes-crashloopbackoff.md
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: What is wrong or missing
17+
description: Be specific β€” an inaccurate cause, a wrong command, a missing fix, an outdated reference.
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: evidence
22+
attributes:
23+
label: Evidence
24+
description: Docs links, a reproduction, or the corrected command/output.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "πŸ“„ New error document"
2+
description: "Propose a new error to add to the library."
3+
title: "[error] <Technology> <Short Error Name>"
4+
labels: ["new-error"]
5+
body:
6+
- type: input
7+
id: title
8+
attributes:
9+
label: Error title
10+
description: SEO-friendly, e.g. "Kubernetes CrashLoopBackOff" or "OpenStack NoValidHost".
11+
placeholder: Technology Short Error Name
12+
validations:
13+
required: true
14+
- type: dropdown
15+
id: technology
16+
attributes:
17+
label: Technology
18+
options:
19+
- kubernetes
20+
- docker
21+
- terraform
22+
- openstack
23+
- linux
24+
- gitlab
25+
- ansible
26+
- prometheus
27+
- grafana
28+
- rabbitmq
29+
- redis
30+
- postgresql
31+
- mysql
32+
- ceph
33+
- linstor
34+
- nginx
35+
- apache
36+
- vmware
37+
- aws
38+
- azure
39+
- gcp
40+
- other
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: message
45+
attributes:
46+
label: Exact error message
47+
description: The verbatim log line or CLI error (the thing engineers paste into a search box).
48+
render: text
49+
validations:
50+
required: true
51+
- type: dropdown
52+
id: severity
53+
attributes:
54+
label: Severity
55+
options: [info, low, medium, high, critical]
56+
validations:
57+
required: true
58+
- type: textarea
59+
id: notes
60+
attributes:
61+
label: What you know
62+
description: Root causes, diagnostic commands, fixes β€” anything to seed the page. A real production log snippet is gold.
63+
- type: checkboxes
64+
id: checks
65+
attributes:
66+
label: Before submitting
67+
options:
68+
- label: I searched and this error is not already documented.
69+
required: true
70+
- label: The information is accurate and based on real systems (no fabricated logs).
71+
required: true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- Thanks for contributing to the DevOps Error Library! -->
2+
3+
## What does this PR do?
4+
5+
<!-- New error(s)? Correction? Tooling? Briefly describe. -->
6+
7+
## Checklist
8+
9+
- [ ] Each error is one Markdown file under `errors/<technology>/` (OpenStack under its service subfolder).
10+
- [ ] Front matter has `title`, `slug`, `technologies`, `severity` (info/low/medium/high/critical) and `tags`.
11+
- [ ] `slug` is kebab-case and **exactly matches the filename** (minus `.md`).
12+
- [ ] All 14 sections are present, in order (Error Message β†’ Tags).
13+
- [ ] The **Error Message** section contains a realistic, real-world log/CLI snippet (no fabricated logs).
14+
- [ ] **Diagnostic Commands** are READ-ONLY (no mutating/destructive commands).
15+
- [ ] `errlib validate` passes locally.
16+
- [ ] Information is accurate, at a senior-engineer level, and cites a reference.
17+
18+
## Related issues
19+
20+
<!-- e.g. Closes #123 -->

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validate:
14+
name: Validate errors, build index, run tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
21+
with:
22+
enable-cache: true
23+
24+
- name: Set up environment
25+
run: |
26+
uv venv
27+
uv pip install -e ".[dev]"
28+
29+
- name: Lint (ruff)
30+
run: uv run ruff check .
31+
32+
- name: Validate every error document (front matter + sections + slugs)
33+
run: uv run errlib validate
34+
35+
- name: Check for duplicate slugs and run the test suite
36+
run: uv run pytest
37+
38+
- name: Build the search index
39+
run: uv run errlib index --out search-index.json
40+
41+
- name: Report library stats
42+
run: uv run errlib stats
43+
44+
- name: Upload search index artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: search-index
48+
path: search-index.json
49+
50+
links:
51+
name: Check Markdown links
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Lychee link checker
56+
uses: lycheeverse/lychee-action@v2
57+
with:
58+
args: >-
59+
--no-progress
60+
--max-concurrency 8
61+
--accept 200,206,429
62+
--exclude-mail
63+
'./**/*.md'
64+
fail: false

β€Ž.gitignoreβ€Ž

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*.egg-info/
5+
build/
6+
dist/
7+
8+
# Virtual environments
9+
.venv/
10+
venv/
11+
12+
# Tooling caches
13+
.pytest_cache/
14+
.ruff_cache/
15+
.coverage
16+
17+
# uv
18+
uv.lock
19+
20+
# Generated artifacts (CI rebuilds these)
21+
search-index.json
22+
23+
# Editors / OS
24+
.idea/
25+
.vscode/
26+
.DS_Store

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# Contributing to the DevOps Error Library
2+
3+
Thank you for helping build the open-source encyclopedia of real DevOps, Cloud, Kubernetes, Docker, Terraform and OpenStack errors. Every accurate page you add saves another engineer a bad night. This guide explains the quality bar, how to add and update errors, the validation/CI rules, and the PR process.
4+
5+
> **TL;DR**
6+
> ```bash
7+
> errlib new "Terraform State Lock" --tech terraform --severity high
8+
> # fill in every section with real logs + read-only diagnostics
9+
> errlib validate # must pass
10+
> # commit, push, open a PR using the checklist below
11+
> ```
12+
13+
---
14+
15+
## 🎯 The quality bar
16+
17+
This is a curated reference, not a link dump. Hold every contribution to **senior DevOps / SRE level**:
18+
19+
- **Accuracy over quantity.** One correct, complete page beats ten thin ones. We would rather merge slowly than merge wrong.
20+
- **No fabricated logs.** Error messages must be **verbatim** strings you have actually seen, reproduced, or sourced from official docs/issues. Do not invent plausible-looking output. If you only have a paraphrase, say so or don't include it.
21+
- **Read-only diagnostics only.** Everything in *Diagnostic Commands* must be safe to run on a live system: `describe`, `get`, `logs`, `status`, `journalctl`, `show`, `inspect`, `EXPLAIN`, etc. Never put a destructive or state-changing command in that section β€” those belong in *Resolution*, clearly flagged as risky.
22+
- **Explain the mechanism.** The *Root Cause Analysis* must connect the log line to *why* the system produced it, not just restate the symptom.
23+
- **Write for the reader at 3 a.m.** Precise, concrete, skimmable. Assume competence; don't pad.
24+
25+
No AI slop. Pages generated wholesale by an LLM without verification will be closed. Using AI to draft is fine β€” verifying every log line and command is mandatory.
26+
27+
---
28+
29+
## βž• Adding a new error
30+
31+
### 1. Scaffold the page
32+
33+
```bash
34+
errlib new "<Human Error Title>" --tech <technology> [--severity <level>] [--tags t1,t2] [--subdir <service>]
35+
```
36+
37+
Examples:
38+
39+
```bash
40+
errlib new "Kubernetes Evicted Pod" --tech kubernetes --severity high
41+
errlib new "Nova No Valid Host" --tech openstack --subdir nova --severity high
42+
```
43+
44+
- `--tech` picks the `errors/<technology>/` folder and is **required**.
45+
- `--subdir` nests the file one level deeper β€” **use it for OpenStack services** (`nova`, `cinder`, `neutron`, `glance`, `keystone`, `heat`, `horizon`, `swift`, `placement`, `ironic`).
46+
- `--severity` is one of `info | low | medium | high | critical` (defaults to `medium`).
47+
- `--tags` is a comma-separated list.
48+
49+
The title becomes a **kebab-case slug**, and the **slug must equal the filename** (without `.md`). `errlib new` handles this for you β€” don't rename the file afterwards without updating the `slug:` field to match.
50+
51+
### 2. Fill in every section
52+
53+
Open the generated file and complete **all 14 sections** β€” none may be empty. Use [`ERROR_TEMPLATE.md`](./ERROR_TEMPLATE.md) as the canonical reference and [`errors/kubernetes/kubernetes-crashloopbackoff.md`](./errors/kubernetes/kubernetes-crashloopbackoff.md) as a worked example.
54+
55+
Section-by-section expectations:
56+
57+
| Section | What good looks like |
58+
| --- | --- |
59+
| **Error Message** | Verbatim string(s) in a fenced block. Include 1–2 realistic variants people paste into search. |
60+
| **Description** | 1–2 paragraphs: what it means, which component emits it, when. |
61+
| **Technologies** | The technology + the component/subsystem. |
62+
| **Severity** | The level **and** the operational impact (degraded / partial / full outage / data-loss risk). |
63+
| **Common Causes** | Ordered by real-world frequency, stated concretely. |
64+
| **Root Cause Analysis** | The mechanism β€” how each cause produces this exact error. |
65+
| **Diagnostic Commands** | Real, **read-only** commands with a comment on what each reveals. |
66+
| **Expected Results** | What the output looks like when broken vs. healthy. |
67+
| **Resolution** | Numbered, actionable steps. Flag any risky/destructive step. |
68+
| **Validation** | The command + output that proves the error is resolved. |
69+
| **Prevention** | Concrete guardrails / CI checks to stop recurrence. |
70+
| **Related Errors** | Relative links to neighbouring pages. |
71+
| **References** | Official docs first; deeper guides may link to https://devopsaitoolkit.com/blog. |
72+
| **Tags** | The same tags as the front matter, as `` `code` `` separated by `Β·`. |
73+
74+
### 3. Get the front matter right
75+
76+
```yaml
77+
---
78+
title: "Kubernetes CrashLoopBackOff" # human title, quoted
79+
slug: kubernetes-crashloopbackoff # MUST match the filename (kebab-case)
80+
technologies: [kubernetes] # one or more
81+
severity: high # info | low | medium | high | critical
82+
tags: [kubernetes, pod, scheduling, crashloopbackoff, production]
83+
related: [kubernetes-imagepullbackoff, kubernetes-oomkilled] # slugs of related pages
84+
last_reviewed: 2026-06-27 # YYYY-MM-DD, the date you verified it
85+
---
86+
```
87+
88+
- **`slug` must equal the filename.** This is checked in CI.
89+
- **`severity`** must be one of the five allowed values.
90+
- **`related`** lists *slugs* (not paths); the body's *Related Errors* section links to them with relative paths.
91+
- **`tags`** should include the technology, the area, the symptom, and `production` where relevant β€” they power `errlib search --tag`.
92+
- **`last_reviewed`** is the date a human verified the content.
93+
94+
### 4. Validate locally
95+
96+
```bash
97+
errlib validate # front matter + sections + slugs; exits non-zero on any issue
98+
errlib index # rebuild the JSON index (optional locally; CI does it)
99+
errlib search "<a phrase from your page>" # sanity-check it's findable
100+
```
101+
102+
`errlib validate` must print `OK β€” N error document(s) valid.` before you open a PR.
103+
104+
---
105+
106+
## ✏️ Updating or verifying existing errors
107+
108+
- Found something inaccurate or outdated? Fix it and bump `last_reviewed` to today's date.
109+
- Re-running the diagnostic commands on a current version of the technology and confirming the output still matches counts as a real, valuable contribution β€” bump `last_reviewed`.
110+
- If a tool's output format changed across versions, note the affected versions in *Description* or *Expected Results* rather than overwriting; keep the page useful for people on older releases.
111+
- Keep edits scoped: one logical change per PR makes review fast.
112+
113+
---
114+
115+
## βœ… Validation & CI rules
116+
117+
Every pull request runs CI, which:
118+
119+
1. Runs **`errlib validate`** β€” fails on missing/empty sections, malformed or missing front-matter keys, an invalid `severity`, or a `slug` that doesn't match the filename.
120+
2. Rebuilds the **JSON search index** (`errlib index`) to confirm the corpus compiles.
121+
3. Regenerates the category indexes (`scripts/gen_indexes.py`) β€” these are navigation aids and are excluded from validation and the search index, so you don't have to hand-edit them.
122+
4. Runs the **test suite** (`pytest`).
123+
124+
If `errlib validate` fails locally, it will fail in CI β€” fix it before pushing.
125+
126+
---
127+
128+
## πŸ”€ Pull request process
129+
130+
1. Fork the repo and create a branch: `git checkout -b add/<tech>-<slug>`.
131+
2. Add or edit error pages; run `errlib validate` until it passes.
132+
3. Commit with a clear message, e.g. `Add: Terraform State Lock error`.
133+
4. Open a PR against `main` and fill in the checklist below.
134+
5. A maintainer reviews for accuracy and the quality bar; address feedback; we merge.
135+
136+
### PR checklist
137+
138+
- [ ] Created the page with `errlib new` (correct `--tech` / `--subdir`).
139+
- [ ] All **14 sections** filled in β€” none empty.
140+
- [ ] Error Message is **verbatim**; no fabricated logs.
141+
- [ ] Diagnostic Commands are **read-only** and safe to run live.
142+
- [ ] Front matter complete: valid `severity`, `slug` == filename, useful `tags`, `related` slugs, `last_reviewed` set.
143+
- [ ] `errlib validate` passes locally (`OK β€” N error document(s) valid.`).
144+
- [ ] Related links and references resolve.
145+
- [ ] One logical change per PR.
146+
147+
---
148+
149+
## πŸ“¦ Claiming & coordinating large batches
150+
151+
Adding 20+ errors for a technology? Help us avoid duplicate work:
152+
153+
1. Open a tracking issue titled e.g. `Batch: 30 PostgreSQL errors` listing the titles/slugs you plan to add.
154+
2. A maintainer will confirm there's no overlap and effectively "assign" the batch to you.
155+
3. Submit in **reviewable chunks** (roughly 5–10 errors per PR) rather than one giant PR β€” it's faster to review and less likely to bit-rot.
156+
4. Check the per-technology targets in [`ROADMAP.md`](./ROADMAP.md) so your batch moves a real goal forward.
157+
158+
---
159+
160+
## 🎨 Style & structure conventions
161+
162+
- **One error per file.** Never combine multiple distinct errors in a page.
163+
- **Folder = technology.** `errors/<technology>/`. OpenStack is split by **service** subfolder.
164+
- **Filename = slug**, kebab-case, prefixed with the technology where natural (`kubernetes-crashloopbackoff.md`, `nova-no-valid-host.md`).
165+
- **Severity scale:** `info` (informational) β†’ `low` β†’ `medium` β†’ `high` β†’ `critical` (data loss / full outage). Choose by operational impact, not by how scary the message looks.
166+
- **Voice:** senior engineer, concrete, no filler. Prefer imperative steps in *Resolution*.
167+
- **Code blocks:** use ```text for logs/output, ```bash for commands, ```yaml for manifests.
168+
- **Links:** relative paths between error pages; absolute URLs for external references.
169+
170+
---
171+
172+
## πŸ“„ Licensing of contributions
173+
174+
By contributing, you agree that:
175+
176+
- **Error content** (anything under `errors/`) is licensed **CC BY 4.0**.
177+
- **Code** (`errlib/`, `scripts/`) is licensed **MIT**.
178+
179+
Only submit content you have the right to share. Thanks for making DevOps troubleshooting better for everyone. πŸ™Œ

0 commit comments

Comments
Β (0)