fix(smoke): pin api to 1 replica in farm-smoke override - #28
Draft
sssaturX wants to merge 1 commit into
Draft
Conversation
The base docker-compose.yml scales api to deploy.replicas: 3 (production shape). The smoke override publishes a fixed host port mapping 127.0.0.1:13000 -> :3000, which only one container can bind at a time. Docker Compose created 3 api containers and the 2nd/3rd failed with: Error response from daemon: failed to set up container networking: ... Bind for 127.0.0.1:13000 failed: port is already allocated This aborted scripts/docker-smoke-mms-offline.sh (and -live.sh by the same path) before any smoke checks could run. Fix: set deploy.replicas: 1 on the api service in the smoke-only override. Base production config is untouched. Co-authored-by: SaturX <sssaturX@users.noreply.github.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.
Problem
scripts/docker-smoke-mms-offline.sh(and-live.sh, same override) aborts at theStarting api + ws-servicestep with:Root cause
docker-compose.ymldeclaresapi.deploy.replicas: 3(production shape). The smoke overridedocker-compose.farm-smoke-override.ymladds a fixed host-port mapping:A host port can be bound by only one container. Compose tries to start
farm-api-1,farm-api-2,farm-api-3— the first succeeds, the rest fail with port is already allocated, and the wholedocker compose upexits non-zero before the smoke script can run any checks.Fix
Set
deploy.replicas: 1on theapiservice in the smoke-only override. Compose deep-mergesdeploy, soresourcesand other base-file fields are preserved. Productiondocker-compose.ymlis untouched.Verification
python3 -c 'import yaml; yaml.safe_load(open("docker-compose.farm-smoke-override.yml"))'✅docker compose config(when docker is available) showsapiwith a single replica and the correct port mapping.scripts/docker-smoke-mms-offline.shshould now proceed pastStarting api + ws-serviceand reach the health/ready polling loop.No production behaviour changes. The override header already states "smoke-test override ONLY. Do not merge for production deploys."