Skip to content

fix(docker): add metadb postgres dependency to mc-infra-connector (fixes clean install Wave 1 failure) - #210

Merged
MZC-CSC merged 2 commits into
m-cmp:mainfrom
MZC-CSC:develop
Sep 30, 2026
Merged

MZC-CSC merged 2 commits into
m-cmp:mainfrom
MZC-CSC:develop

Conversation

@MZC-CSC

@MZC-CSC MZC-CSC commented Sep 30, 2026

Copy link
Copy Markdown
Member

Problem

On a clean install, installAll.sh fails at Wave 1:

mc-infra-connector exited with code 2 (restarting)
mc-infra-manager | ... GET mc-infra-connector:1024/spider/readyz ... lookup mc-infra-connector on 127.0.0.11:53: server misbehaving
mc-infra-manager | ... setup: CB-Spider not ready, retrying (17/60)
dependency failed to start: container mc-infra-manager is unhealthy
❌ Service startup failed (exit code: 1) - Wave 1 (mc-infra-connector mc-infra-manager ...)

Root cause

  • Since cb-spider 0.13.9 (Add missing configuration for infra connector #191), its metadata DB runs as a separate container, mc-infra-connector-postgres.
  • mc-infra-connector has no depends_on for this container.
  • The startup waves in installAll.sh list only entry-point services. They expect compose to start everything else through the depends_on chain, so Wave 1 never starts the postgres container.
  • cb-spider cannot resolve mc-infra-connector-postgres:5432 and exits with code 2 in a restart loop. mc-infra-manager then becomes unhealthy while waiting on /spider/readyz, and Wave 1 fails.
  • Existing installs don't hit this because postgres is already running. It only reproduces on a clean install.

A related gap: MC_INFRA_CONNECTOR_POSTGRES_HOST_PORT was missing from .env.setup. The port mapping resolved to :5432, so postgres was published on a random host port.

Changes

  • conf/docker/docker-compose.yaml: add depends_on: mc-infra-connector-postgres (condition: service_healthy) to mc-infra-connector. The postgres service already has a pg_isready healthcheck.
  • conf/docker/.env.setup: add MC_INFRA_CONNECTOR_POSTGRES_HOST_PORT=6433, next to the infra-manager postgres on 6432. For existing installs, sync_missing_env_vars in installAll.sh adds it to .env automatically.
  • docker-compose.mini.yaml does not need this change. It still uses cb-spider 0.12.18 with a SQLite meta_db.

yh-noh and others added 2 commits September 30, 2026 02:26
… Wave 1 실패 수정)

- mc-infra-connector가 mc-infra-connector-postgres(healthy)에 의존하도록 depends_on 추가
- .env.setup에 누락된 MC_INFRA_CONNECTOR_POSTGRES_HOST_PORT(6433) 추가
…ndency

fix(docker): mc-infra-connector에 metadb postgres depends_on 추가
@MZC-CSC
MZC-CSC merged commit cc8b666 into m-cmp:main Sep 30, 2026
1 check passed
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.

2 participants