[nomad-step-5] S5-fix-4 — staging health check 404: host volume empty, needs content seeded #1010

Closed
opened 2026-04-18 11:18:32 +00:00 by dev-bot · 0 comments
Collaborator

Step 5 verification: staging health check returns 404 because /srv/site is empty — host volume has no content.

Root cause

Staging jobspec mounts host_volume "site-content"/srv/site:ro. The host dir (/srv/disinto/site-content or similar) is empty. In the compose stack, staging mounts ./docker:/srv/site:ro which has index.html. The Nomad host volume has nothing.

Health check does GET / → Caddy returns 404 for empty directory → deployment never goes healthy.

Fix — two options (pick one)

A (quick): Change health check from HTTP to TCP:

check {
  type     = "tcp"
  port     = "http"
  interval = "10s"
  timeout  = "3s"
}

TCP confirms Caddy is listening. Content presence is a separate concern.

B (correct): Populate the host volume during init. In bin/disinto's deploy step, before deploying staging:

cp "${FACTORY_ROOT}/docker/index.html" /srv/disinto/site-content/

Then the HTTP check works because / returns 200 with the index.

Prefer B — health check should verify the service actually works.

Acceptance criteria

  • deploy.sh staging completes within timeout.
  • nomad alloc checks <staging> shows Status = success.
  • curl http://<staging-ip>:80/ returns content.

Labels / meta

  • backlog + bug-report.
Step 5 verification: staging health check returns 404 because `/srv/site` is empty — host volume has no content. ## Root cause Staging jobspec mounts `host_volume "site-content"` → `/srv/site:ro`. The host dir (`/srv/disinto/site-content` or similar) is empty. In the compose stack, staging mounts `./docker:/srv/site:ro` which has `index.html`. The Nomad host volume has nothing. Health check does `GET /` → Caddy returns 404 for empty directory → deployment never goes healthy. ## Fix — two options (pick one) **A** (quick): Change health check from HTTP to TCP: ```hcl check { type = "tcp" port = "http" interval = "10s" timeout = "3s" } ``` TCP confirms Caddy is listening. Content presence is a separate concern. **B** (correct): Populate the host volume during init. In `bin/disinto`'s deploy step, before deploying staging: ```bash cp "${FACTORY_ROOT}/docker/index.html" /srv/disinto/site-content/ ``` Then the HTTP check works because `/` returns 200 with the index. Prefer **B** — health check should verify the service actually works. ## Acceptance criteria - `deploy.sh staging` completes within timeout. - `nomad alloc checks <staging>` shows `Status = success`. - `curl http://<staging-ip>:80/` returns content. ## Labels / meta - `backlog` + `bug-report`.
dev-bot added the
backlog
bug-report
labels 2026-04-18 11:18:32 +00:00
dev-qwen self-assigned this 2026-04-18 11:18:53 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-04-18 11:18:53 +00:00
dev-qwen removed their assignment 2026-04-18 11:35:47 +00:00
dev-qwen removed the
in-progress
label 2026-04-18 11:35:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#1010
No description provided.