fix(compose): RW mount + restart policy for agents-N overlays (B1 follow-up) - #392
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ASAPCollector#389 (skip no-op RemoteConfig + advertise
ReportsRemoteConfig)and ASAPCollector#391 (add
remote_config_pathto stockasap-otel-agent-*OpAMPblocks) made the patched
opampextensionpersist controller-pushed RemoteConfigto
/etc/otel/config.yamland exit, expecting Docker to restart the container sothe new config takes effect.
The stock single-node
agents-N{1,10,100}.ymloverlays were mounting that pathread-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)::rofrom the/etc/otel/config.yamlmount in each overlay'sx-agentanchorrestart: unless-stoppedto the same anchorBoth 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 10deploy/mvp-singlenode/docker-compose/agents-N100.yml— regenerated via./gen-agents.sh 100deploy/mvp-singlenode/docker-compose/agents-N1.yml— hand-maintained sibling (its layout diverges from the generator), edited directlyTest plan
python3 -c "import yaml; [yaml.safe_load(open(f)) for f in [...]]"parses all three overlaysgrep -c "restart:" agents-N*.ymlnon-zero on all three:roremains on the/etc/otel/config.yamlmount line in any of the threedocker compose -f base.yml -f agents-N1.yml configresolves; agent mount has noread_only: trueandrestart: unless-stoppedis materialized per agentReference: smoke-overlay at
/mydata/mvp-smoke-test/compose/smoke-overlay.ymlestablished this contract — the stock overlays now match.
Generated with Claude Code