Skip to content

fix(deploy): make up passes on a stack with no Alertmanager, and the stale-mount guard sees the lab's prefixed containers - #569

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/make-up-lab-checks-4e9b21
Sep 20, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/make-up-lab-checks-4e9b21

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 20, 2026

Copy link
Copy Markdown
Owner

What changed

Two deploy-time checks in make up stop assuming the estate's stack.

  • scripts/check_alert_channels.py notes and exits 0 when the stack's compose.yaml declares no alertmanager service. It still fails hard when a stack declares one and has no config. CI and validate.sh call it with no stack argument and see no change.
  • scripts/check_mounted_config.py carries the container name beside the service name. docker ps and docker cp get the container, docker compose up --force-recreate gets the service, and the post-recreate re-check unpacks the same tuple.

Why

Running build-the-jumpbox.md §5 on alexander today (#436), make up STACK=lab brought the stack up, reloaded it and passed the health check, then exited 1 on check_alert_channels.py: no alertmanager.yaml for the lab, which has none by ADR-0020. The soc, media and sensitive stacks would fail the same way.

Two steps earlier, check_mounted_config.py --fix lab printed SKIP <service> is not running for every service while all four were up, then reported 0 single-file mount(s) match as OK. The lab's services are named lab-prometheus and so on, so the #355 stale-mount guard has never actually checked the lab since the stack landed.

Blast radius

The deploy path of every stack. Nothing on the monitoring host changes behaviour: the observability stack has an Alertmanager and names its containers after its services, and both checks were exercised against the live stack here read-only with the same result as before.

  • 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

  • scripts/lint.sh passes; py_compile on both scripts
  • check_alert_channels.py --files --live lab, soc, media → NOTE, exit 0; no argument → alert channels OK — 4 receiver URL(s) as before
  • check_mounted_config.py observability against the live stack, read-only → 4 single-file mount(s) match, as before
  • make up STACK=lab on alexander after merge: the lab's four containers should now be checked rather than skipped, and the target should exit 0
  • Docs: the reason is in each script's comment; no runbook names the failure

Refs #436.

🤖 Generated with Claude Code

…stale-mount guard sees containers the lab names with a prefix

Two checks in `make up` assumed the estate's stack. check_alert_channels.py
exited 1 on any stack without alertmanager/alertmanager.yaml, so `make up
STACK=lab` — and soc, media and sensitive after it — failed on its last step
after compose, the reload and the health check had all succeeded; it now
notes that the stack declares no alertmanager service and exits 0, and still
fails hard for a stack that declares one without a config. The CI and
validate.sh invocations pass no stack and are unchanged.

check_mounted_config.py matched compose service names against `docker ps`
names. stacks/lab sets container_name with a `lab-` prefix on every service,
so every lab container was "not running" and the check reported "0 mount(s)
match" as OK: the #355 guard had never guarded the lab. It now carries the
container name beside the service name — the container for `docker ps` and
`docker cp`, the service for `--force-recreate` — and the post-recreate
re-check unpacks the same tuple.

Found running build-the-jumpbox.md §5 on alexander (#436).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit 9f65fe6 into main Sep 20, 2026
3 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/make-up-lab-checks-4e9b21 branch September 20, 2026 08:35
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.

1 participant