Skip to content

docs(ops): add operator runbook for common failures - #364

Merged
thiras merged 2 commits into
mainfrom
docs/operator-runbook
Apr 30, 2026
Merged

thiras merged 2 commits into
mainfrom
docs/operator-runbook

Conversation

@thiras

@thiras thiras commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #245.

Adds docs/runbook.md — a single-page operator runbook covering the failure modes operators hit first. Each section names the symptom, cites the actual Prometheus alert (verbatim from monitoring/prometheus-alerts.yml) or metric that surfaces it, and lists action-oriented remediation steps with ADR cross-references.

Sections:

  • Disk full — decdn_cache_bytes near cache.cache_size_mb; raise limit, prune, or move cache_dir. Notes that manual truncation produces hash-mismatch slash signal.
  • RPC unreachable — DecdnBlacklistSyncLagWarning / DecdnBlacklistSyncLagCritical; rotate blockchain.rpc_url to a secondary provider.
  • Slashing risk — DecdnProbeHoldViolations, DecdnSlashEvidenceExposure, DecdnBlacklistSyncLagCritical, DecdnBlacklistVersionFarBehind, DecdnRateBoundsClamp; submit counter-evidence within the 24-hour ADR-014 window after fixing the root cause.
  • Gossip / peer table degraded — DecdnPeerTableThin, decdn_iroh_* transport metrics; check QUIC reachability, bootstrap list, clock skew.
  • Where to ask for help — links to issues, ADRs, monitoring assets.

README.md and CONTRIBUTING.md gain one-line links so the runbook is discoverable from the repo root and future operator docs land in the same place.

Test plan

  • pre-commit run --all-files passes locally (markdownlint clean).
  • Cited alert names match monitoring/prometheus-alerts.yml verbatim.
  • Cited metrics (decdn_cache_bytes, decdn_peer_table_size, decdn_iroh_*) match adr/appendix-observability.md and crates/node/src/metrics.rs.
  • Config keys (cache.cache_dir, cache.cache_size_mb, blockchain.rpc_url) match the actual config schema in crates/node/src/config/.
  • No new docs/ files created beyond runbook.md.
  • Runbook fits on roughly two screens (~166 lines, under the 200-line target).

Adds docs/runbook.md covering the failure modes operators hit first:
disk full, RPC unreachable, slashing risk, and degraded gossip / peer
table. Each section names the symptom, cites the actual Prometheus
alert (verbatim from monitoring/prometheus-alerts.yml) or metric that
surfaces it, and lists action-oriented remediation steps with ADR
cross-references.

README.md and CONTRIBUTING.md gain one-line links so the runbook is
discoverable from the repo root and so future operator-facing
documentation lands in the same place.

Closes #245

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 30, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an operator-focused runbook to help first responders diagnose and remediate common node failures, and links it from repo entrypoints for discoverability.

Changes:

  • Added docs/runbook.md covering disk, RPC, slashing-risk, and gossip/peer-table incidents with alert/metric references.
  • Linked the runbook from README.md (Operations section).
  • Added a contribution convention note pointing operator runbook entries to docs/runbook.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
docs/runbook.md New operator runbook with detection/remediation steps and ADR/monitoring references.
README.md Adds an “Operations” section linking to the runbook.
CONTRIBUTING.md Documents that operator runbook guidance should live in docs/runbook.md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved
Comment thread docs/runbook.md Resolved

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive Operator Runbook in docs/runbook.md, detailing symptoms, detection, and remediation for critical failure modes like disk exhaustion, RPC connectivity issues, slashing risks, and gossip degradation. Corresponding links and contribution guidelines were updated in README.md and CONTRIBUTING.md. Feedback suggests clarifying that a 405 Method Not Allowed error during RPC probing typically signifies an incorrect endpoint URL.

Comment thread docs/runbook.md Resolved
…config

Reviewer flagged that the operator runbook referenced metrics, config knobs,
and bind-interface advice that do not exist in the current code (the prior
text described future state described in ADRs / appendix-observability).
Brought the doc in line with what crates/node/src/metrics.rs registers and
what crates/node/src/config/types.rs accepts today:

- Disk full: drop the dead `decdn_cache_bytes` reference and the
  `× 1_000_000` MB conversion; clarify that `cache.cache_size_mb` is dead
  config (engine takes only `max_blob_size_mb` and performs no eviction);
  point operators at `df -h` until cache instrumentation lands. Note SIGHUP
  re-tune (#236) is still in flight.
- Slashing risk: stop suggesting operators "raise `max_probe_holds`" —
  it is not a config field. Reword to focus on OOM / resource pressure
  and ADR 005/008 context.
- Gossip / peer table: replace `decdn_peer_table_size` with the real
  `decdn_gossip_peer_table_size` metric name; explicitly note
  `decdn_streams_active` is not yet exported. Drop the
  "switch bind to 0.0.0.0" advice — the node already binds
  `Ipv4Addr::UNSPECIFIED` in `build_endpoint`. Drop the bootstrap-peer
  knob ('not in config'); reword around `network.bind_port` reachability
  and `appendix-operator-key-rotation.md`.
- RPC unreachable: add a brief note that a 405 on the curl probe means
  the URL path is wrong, not the provider is down.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@thiras
thiras merged commit 637a3be into main Apr 30, 2026
9 checks passed
@thiras
thiras deleted the docs/operator-runbook branch April 30, 2026 20:43
thiras added a commit that referenced this pull request Apr 30, 2026
Resolves conflicts with PRs #363/#364/#365/#366 that landed on main while
this branch was in review. Conflict resolution:

- crates/node/Cargo.toml: keep both new dev-deps (nix from this branch
  for SIGHUP integration tests, wiremock from #366 for the rpc-watchdog
  test).
- crates/node/src/runtime/mod.rs: union the test-module clippy allows
  ([unwrap_used, expect_used, panic, indexing_slicing]); keep both new
  test bodies (rpc_watchdog_tracks_endpoint_transitions from #366 plus
  shutdown_streams_recv_resolves_on_sigterm from this branch).
- Test fixtures across config/mod.rs, runtime/reload.rs, and
  tests/sighup_signal.rs gained the rpc_watchdog_interval_sec field
  (Option::None for FileConfig literals; literal 30u64 for ResolvedBlockchain).

Verified post-merge: cargo fmt --check, cargo clippy --workspace
--all-targets -- -D warnings, cargo nextest run -p decdn-node (179/179),
RUSTDOCFLAGS=-D warnings cargo doc --workspace --no-deps --document-private-items,
all clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: no runbook or operator guide for common failure scenarios (disk full, RPC unreachable, slashing risk)

2 participants