Skip to content

docs(adr): ADR-0124, power gandalf off on a timer - #1648

Merged
Gerrrt merged 5 commits into
mainfrom
gerrrt/gandalf-poweroff-timer-adr
Nov 23, 2026
Merged

Gerrrt merged 5 commits into
mainfrom
gerrrt/gandalf-poweroff-timer-adr

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What changed

Adds ADR-0124: gandalf powers itself off six hours after boot, or after the last range-extend. One extension is capped at twelve hours. It warns on every shell 30 and 5 minutes before, and never powers off while dpkg holds its lock. The rest of the change:

  • ADR-0017 gains a note.
  • build-the-playground.md §7 says the timer is decided and not built yet.
  • The changelog and the roadmap gain entries.
  • README's ADR count goes to 124.

Docs only. Nothing changes on gandalf until #1647 builds it.

Stacked on #1646 (base gerrrt/gandalf-audit-2026-11-22) so the two changelog entries don't conflict. Merge #1646 first, and GitHub retargets this one to main.

Why

The 2026-11-13 and 2026-11-22 audits both found gandalf left on for days. ragnarok ran unattended on VLAN 30 from 2026-11-12 to 2026-11-22. ADR-0017's "no monitoring" and §7's per-session firewall read-back both assume the box is off. The owner chose a timer on the host (option 2 in the ADR) over a collector with an "on too long" alert, because it ends the fault instead of reporting it and keeps "no monitoring". Refs #1647.

Blast radius

None until #1647 is built. After that, gandalf only. The failure mode is a session cut short if the warning is missed. The guests stop through Proxmox's own shutdown, and §7 reverts the targets at the next start.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • make validate passes. It was not run, because this Mac has no docker daemon. What ran:
    • check_docs.py: docs OK. The README count of 124 ADRs is checked there.
    • markdownlint-cli2 0.24.1 (pinned version, via npx): 0 issues across 212 files.
    • scripts/check_close_keywords.py --text: PASS on this body and on the commit.
    • ./scripts/lint.sh: ruff, yamllint, shellcheck and actionlint pass (the last two as local binaries). tofu, packer, zizmor and editorconfig-checker were skipped with no docker. ansible-lint FAILED on a local runner error (--pip-args contains '-c'), and this PR touches no Ansible.
  • Deployed to the lab and confirmed working. Not applicable until Power gandalf off on a timer (ADR-0124) #1647.
  • Docs updated

🤖 Generated with Claude Code

Gerrrt and others added 2 commits November 22, 2026 17:23
The second read-only audit found containment holding and four gaps.
build-the-playground.md gains:
- section 2: ip-forward off on vmbr0, and a netdev ingress table on vmbr1
  so the host takes nothing from the range, ARP included;
- section 4: X11 and TCP forwarding off in the keys-only drop-in, and
  "Nothing else on gandalf", which removes the dotfiles install and the
  third-party apt repos;
- section 7: a read-back for each;
- section 8: check four proves the ingress table, and the stale
  "until 902 is rebuilt" note is updated.

security.md gains the row. The changelog records the audit, including the
credential cleanup nothing had recorded. None of it is applied on gandalf
yet.

Refs #421.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two audits found the range host left on for days, against the "off
between sessions" that ADR-0017's "no monitoring" rests on. ADR-0124
chooses a timer on the host over a collector and an "on too long" alert.
The host powers off six hours after boot or after the last range-extend
(capped at twelve hours), warns 30 and 5 minutes before, and waits while
dpkg holds its lock.

ADR-0017 gains a note. build-the-playground.md section 7 says the timer is
decided and not built. The changelog and roadmap gain entries, and README's
ADR count is 124. #1647 builds it.

Refs #1647.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 01:29

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.

🟡 Changes recommended

The ADR describes six hours as a fixed shutdown bound, conflicting with caller-selected extensions up to twelve hours and additional polling or lock delays.

2 open issues
What changed in this PR

Records the decision to give gandalf a host-local shutdown timer, reducing reliance on manual power-off while preserving the range’s no-monitoring policy. This is documentation only; implementation remains tracked in #1647.

Changes:

  • Adds ADR-0124 covering shutdown deadlines, capped extensions, shell warnings and package-install deferral.
  • Links the decision from ADR-0017, the playground runbook, roadmap and changelog.
  • Updates README’s ADR count to 124.
File Description
README.md Updates both ADR counts to 124.
docs/​runbooks/​build-the-playground.md Introduces the planned timer and explicitly marks it as not yet built.
docs/​roadmap.md Adds the timer implementation issue and rationale.
docs/​changelog.md Records the timer decision and follow-up work.
docs/​adr/​0124-power-gandalf-off-on-a-timer.md Defines the timer policy, alternatives and operational consequences.
docs/​adr/​0017-buy-ifrit-for-iops-and-keep-the-range-disposable.md Adds a note linking the timer decision while preserving the original ADR text.

Review effort: Balanced

range-extend replaces the deadline with 1 to 12 hours from now, and the
power-off can lag the deadline by a timer period and by a held dpkg lock.
The decision and the first Consequence now say so, and the ADR-0017 note,
the changelog entry and section 7 match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt added this pull request to stack #1650 November 23, 2026 01:42
Base automatically changed from gerrrt/gandalf-audit-2026-11-22 to main November 23, 2026 01:44
Gerrrt and others added 2 commits November 22, 2026 17:46
…ff-timer-adr

# Conflicts:
#	docs/changelog.md
#	docs/runbooks/build-the-playground.md
Review on #1649: a five-minute cadence equals the five-minute warning
window, so a late run could skip the last warning. And without a lock, a
check could act on a deadline an extension had just replaced. The decision
now says every minute and one lock, and the Consequence's lag is about a
minute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit 7c48f67 into main Nov 23, 2026
12 of 13 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/gandalf-poweroff-timer-adr branch November 23, 2026 03:09
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.

2 participants