Skip to content

fix(compose): RW mount + restart policy for agents-N overlays (B1 follow-up) - #392

Merged
zzylol merged 1 commit into
mainfrom
fix/compose-overlay-rw-mount-restart
May 18, 2026
Merged

zzylol merged 1 commit into
mainfrom
fix/compose-overlay-rw-mount-restart

Conversation

@zzylol

@zzylol zzylol commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

ASAPCollector#389 (skip no-op RemoteConfig + advertise ReportsRemoteConfig)
and ASAPCollector#391 (add remote_config_path to stock asap-otel-agent-* OpAMP
blocks) made the patched opampextension persist controller-pushed RemoteConfig
to /etc/otel/config.yaml and exit, expecting Docker to restart the container so
the new config takes effect.

The stock single-node agents-N{1,10,100}.yml overlays were mounting that path
read-only and had no restart policy. So on a real OpAMP apply against a
stock deploy the agent would EROFS on the disk write and stay down — defeating
the whole #391 wiring.

This PR mirrors the working contract already used by the smoke harness overlay
(/mydata/mvp-smoke-test/compose/smoke-overlay.yml):

  • drop :ro from the /etc/otel/config.yaml mount in each overlay's x-agent anchor
  • add restart: unless-stopped to the same anchor

Both edits are required — RW alone leaves the agent dead after exit; restart alone leaves the on-disk write failing.

Files touched

  • deploy/mvp-singlenode/docker-compose/gen-agents.sh — generator template (source of truth for N10/N100)
  • deploy/mvp-singlenode/docker-compose/agents-N10.yml — regenerated via ./gen-agents.sh 10
  • deploy/mvp-singlenode/docker-compose/agents-N100.yml — regenerated via ./gen-agents.sh 100
  • deploy/mvp-singlenode/docker-compose/agents-N1.yml — hand-maintained sibling (its layout diverges from the generator), edited directly

Test plan

  • python3 -c "import yaml; [yaml.safe_load(open(f)) for f in [...]]" parses all three overlays
  • grep -c "restart:" agents-N*.yml non-zero on all three
  • No :ro remains on the /etc/otel/config.yaml mount line in any of the three
  • docker compose -f base.yml -f agents-N1.yml config resolves; agent mount has no read_only: true and restart: unless-stopped is materialized per agent
  • CI green

Reference: smoke-overlay at /mydata/mvp-smoke-test/compose/smoke-overlay.yml
established this contract — the stock overlays now match.

Generated with Claude Code

…low-up)

ASAPCollector#389 (skip no-op RemoteConfig + advertise ReportsRemoteConfig)
and ASAPCollector#391 (add remote_config_path to stock asap-otel-agent
OpAMP blocks) made the patched opampextension persist controller-pushed
RemoteConfig to /etc/otel/config.yaml and exit, expecting Docker to
restart the container so the new config takes effect.

The stock single-node overlays were mounting that path read-only and had
no restart policy, so on a real OpAMP apply the agent would EROFS on the
write and stay down. Match the working smoke-overlay contract:

  - drop ':ro' from the /etc/otel/config.yaml mount in the x-agent anchor
  - add 'restart: unless-stopped' to the same anchor

Files touched:
  - deploy/mvp-singlenode/docker-compose/gen-agents.sh (template, source of truth for N10/N100)
  - deploy/mvp-singlenode/docker-compose/agents-N10.yml (regenerated)
  - deploy/mvp-singlenode/docker-compose/agents-N100.yml (regenerated)
  - deploy/mvp-singlenode/docker-compose/agents-N1.yml (hand-maintained sibling, edited directly)

Reference: /mydata/mvp-smoke-test/compose/smoke-overlay.yml already does
this for the smoke harness; the stock overlays now match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 4cce093 into main May 18, 2026
@zzylol
zzylol deleted the fix/compose-overlay-rw-mount-restart branch July 17, 2026 20:08
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