From f8a4ef17fccf2245b757652ebdc0ea8876ba015c Mon Sep 17 00:00:00 2001 From: zz_y Date: Mon, 18 May 2026 05:31:01 -0600 Subject: [PATCH] fix(compose): RW mount + restart policy for agents-N overlays (B1 follow-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) --- deploy/mvp-singlenode/docker-compose/agents-N1.yml | 12 +++++++++++- .../mvp-singlenode/docker-compose/agents-N10.yml | 14 ++++++++++++-- .../mvp-singlenode/docker-compose/agents-N100.yml | 14 ++++++++++++-- deploy/mvp-singlenode/docker-compose/gen-agents.sh | 12 +++++++++++- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/deploy/mvp-singlenode/docker-compose/agents-N1.yml b/deploy/mvp-singlenode/docker-compose/agents-N1.yml index fcfe6bb6..90ee3e6f 100644 --- a/deploy/mvp-singlenode/docker-compose/agents-N1.yml +++ b/deploy/mvp-singlenode/docker-compose/agents-N1.yml @@ -15,6 +15,16 @@ x-agent: &agent-base depends_on: - gateway - controller + # The opampextension's `remote_config_path` (ASAPCollector#391) + # writes the controller-pushed RemoteConfig back to + # `/etc/otel/config.yaml` and exits, expecting Docker to restart + # the container so the new config takes effect. Both of the + # following are required for that flow to work: + # - the mount must be RW (no `:ro`) so the on-disk write succeeds + # - `restart: unless-stopped` so Docker brings the agent back up + # See /mydata/mvp-smoke-test/compose/smoke-overlay.yml for the + # working reference that established this contract. + restart: unless-stopped # Agents are configured via the mounted sketch pipeline; overriding # the entrypoint isn't needed — the patched asap-otel binary # is the default. @@ -26,7 +36,7 @@ x-agent: &agent-base # paper baselines' compose overlays (baseline-b*.yml) set # it before `docker compose up`. Compose expands the # ${VAR:-default} syntax at container start. - - ../configs/${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml:ro + - ../configs/${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml environment: CONTROLLER_OPAMP_URL: "ws://controller:4320/v1/opamp" # Runtime-samples push endpoint — sketch-runtime sends diff --git a/deploy/mvp-singlenode/docker-compose/agents-N10.yml b/deploy/mvp-singlenode/docker-compose/agents-N10.yml index 4aeb1dfb..d05eb290 100644 --- a/deploy/mvp-singlenode/docker-compose/agents-N10.yml +++ b/deploy/mvp-singlenode/docker-compose/agents-N10.yml @@ -15,6 +15,16 @@ x-agent: &agent-base depends_on: - gateway - controller + # The opampextension's `remote_config_path` (ASAPCollector#391) + # writes the controller-pushed RemoteConfig back to + # `/etc/otel/config.yaml` and exits, expecting Docker to restart + # the container so the new config takes effect. Both of the + # following are required for that flow to work: + # - the mount must be RW (no `:ro`) so the on-disk write succeeds + # - `restart: unless-stopped` so Docker brings the agent back up + # See /mydata/mvp-smoke-test/compose/smoke-overlay.yml for the + # working reference that established this contract. + restart: unless-stopped command: - "--config=/etc/otel/config.yaml" volumes: @@ -23,7 +33,7 @@ x-agent: &agent-base # paper baselines' compose overlays (baseline-b*.yml) set # it before `docker compose up`. Compose expands the # ${VAR:-default} syntax at container start. - - ../configs/${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml:ro + - ../configs/${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml deploy: resources: limits: @@ -42,7 +52,7 @@ services: fake-exporter: environment: EXPORTER_TARGET: "agent-1:4317" - # Workload-sweep knobs. Defaults match the N=1 + # workload-sweep knobs. Defaults match the N=1 # smoke-test. Override at bring-up: # # EXPORTER_RATE=10000 EXPORTER_CARDINALITY=5000 \ diff --git a/deploy/mvp-singlenode/docker-compose/agents-N100.yml b/deploy/mvp-singlenode/docker-compose/agents-N100.yml index 23b7075f..19cb88bc 100644 --- a/deploy/mvp-singlenode/docker-compose/agents-N100.yml +++ b/deploy/mvp-singlenode/docker-compose/agents-N100.yml @@ -15,6 +15,16 @@ x-agent: &agent-base depends_on: - gateway - controller + # The opampextension's `remote_config_path` (ASAPCollector#391) + # writes the controller-pushed RemoteConfig back to + # `/etc/otel/config.yaml` and exits, expecting Docker to restart + # the container so the new config takes effect. Both of the + # following are required for that flow to work: + # - the mount must be RW (no `:ro`) so the on-disk write succeeds + # - `restart: unless-stopped` so Docker brings the agent back up + # See /mydata/mvp-smoke-test/compose/smoke-overlay.yml for the + # working reference that established this contract. + restart: unless-stopped command: - "--config=/etc/otel/config.yaml" volumes: @@ -23,7 +33,7 @@ x-agent: &agent-base # paper baselines' compose overlays (baseline-b*.yml) set # it before `docker compose up`. Compose expands the # ${VAR:-default} syntax at container start. - - ../configs/${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml:ro + - ../configs/${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml deploy: resources: limits: @@ -42,7 +52,7 @@ services: fake-exporter: environment: EXPORTER_TARGET: "agent-1:4317" - # Workload-sweep knobs. Defaults match the N=1 + # workload-sweep knobs. Defaults match the N=1 # smoke-test. Override at bring-up: # # EXPORTER_RATE=10000 EXPORTER_CARDINALITY=5000 \ diff --git a/deploy/mvp-singlenode/docker-compose/gen-agents.sh b/deploy/mvp-singlenode/docker-compose/gen-agents.sh index df40de09..1dc3bdb6 100755 --- a/deploy/mvp-singlenode/docker-compose/gen-agents.sh +++ b/deploy/mvp-singlenode/docker-compose/gen-agents.sh @@ -30,6 +30,16 @@ x-agent: &agent-base depends_on: - gateway - controller + # The opampextension's \`remote_config_path\` (ASAPCollector#391) + # writes the controller-pushed RemoteConfig back to + # \`/etc/otel/config.yaml\` and exits, expecting Docker to restart + # the container so the new config takes effect. Both of the + # following are required for that flow to work: + # - the mount must be RW (no \`:ro\`) so the on-disk write succeeds + # - \`restart: unless-stopped\` so Docker brings the agent back up + # See /mydata/mvp-smoke-test/compose/smoke-overlay.yml for the + # working reference that established this contract. + restart: unless-stopped command: - "--config=/etc/otel/config.yaml" volumes: @@ -38,7 +48,7 @@ x-agent: &agent-base # paper baselines' compose overlays (baseline-b*.yml) set # it before \`docker compose up\`. Compose expands the # \${VAR:-default} syntax at container start. - - ../configs/\${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml:ro + - ../configs/\${AGENT_CONFIG:-asap-otel-agent-b2-full.yaml}:/etc/otel/config.yaml deploy: resources: limits: