You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the #211 fix, stacker agent deploy-app <app> --image <img> --force succeeds (no more "undefined network" error) and reports "status": "deployed", but the redeployed container actually ends up broken: it's placed on a different Docker network than its sibling services, so service-name DNS resolution fails and the app crash-loops.
Steps to reproduce
Full cloud deploy of a project with an app + a service it depends on via hostname, e.g. miniflux (trydirect/stacker-project-examples) — DATABASE_URL uses hostname postgres.
Check container health shortly after — the new container is crash-looping:
stacker agent health
CONTAINER STATE
miniflux restarting
project-postgres-1 running
project-app-1 running <- old container, untouched
(Note: agent deploy-app created a new container literally named miniflux, alongside the original project-app-1 — a separate issue in itself, but focusing on the network problem here.)
Root cause (confirmed via docker inspect/docker network ls on the target server)
New miniflux container's logs: dial tcp: lookup postgres on 127.0.0.11:53: server misbehaving — Docker embedded DNS can't resolve postgres.
docker inspect miniflux → networks: project_default_network (note the project_ prefix).
docker inspect project-postgres-1 → networks: default_network and project_app-network (no project_default_network).
docker network ls shows both default_network and project_default_network exist as separate networks on the host; docker network inspect project_default_network has zero containers attached despite the miniflux container's inspect output claiming membership in it (empty EndpointID — the attach may not have actually completed, likely downstream of the container's own crash-restart loop).
So stacker agent deploy-app's redeploy path uses a project_-prefixed network name that doesn't match the network the original full-stack deploy created/uses (default_network, unprefixed, per the #211 fix). The two deploy paths (stacker deploy --target cloud vs stacker agent deploy-app) appear to use inconsistent naming conventions for the same project.
Expected
stacker agent deploy-app should place the redeployed container on the same network as the rest of the project's stack (whatever the original stacker deploy created), so service-name DNS resolution keeps working.
Impact
High for the agent deploy-app workflow specifically — the command reports success but silently leaves the app unable to reach its database, with no error surfaced to the caller.
Summary
After the #211 fix,
stacker agent deploy-app <app> --image <img> --forcesucceeds (no more "undefined network" error) and reports"status": "deployed", but the redeployed container actually ends up broken: it's placed on a different Docker network than its sibling services, so service-name DNS resolution fails and the app crash-loops.Steps to reproduce
miniflux(trydirect/stacker-project-examples) —DATABASE_URLuses hostnamepostgres.project-app-1/project-postgres-1on networkdefault_network(per the Remote compose references undefined networkdefault_network#211-fixed renderer).{ "status": "deployed", "container_state": "starting", ... }agent deploy-appcreated a new container literally namedminiflux, alongside the originalproject-app-1— a separate issue in itself, but focusing on the network problem here.)Root cause (confirmed via
docker inspect/docker network lson the target server)minifluxcontainer's logs:dial tcp: lookup postgres on 127.0.0.11:53: server misbehaving— Docker embedded DNS can't resolvepostgres.docker inspect miniflux→ networks:project_default_network(note theproject_prefix).docker inspect project-postgres-1→ networks:default_networkandproject_app-network(noproject_default_network).docker network lsshows bothdefault_networkandproject_default_networkexist as separate networks on the host;docker network inspect project_default_networkhas zero containers attached despite theminifluxcontainer's inspect output claiming membership in it (emptyEndpointID— the attach may not have actually completed, likely downstream of the container's own crash-restart loop).So
stacker agent deploy-app's redeploy path uses aproject_-prefixed network name that doesn't match the network the original full-stack deploy created/uses (default_network, unprefixed, per the #211 fix). The two deploy paths (stacker deploy --target cloudvsstacker agent deploy-app) appear to use inconsistent naming conventions for the same project.Expected
stacker agent deploy-appshould place the redeployed container on the same network as the rest of the project's stack (whatever the originalstacker deploycreated), so service-name DNS resolution keeps working.Impact
High for the
agent deploy-appworkflow specifically — the command reports success but silently leaves the app unable to reach its database, with no error surfaced to the caller.Environment
default_network#211 fix landed — same session, sameminifluxdeployment (trydirect/stacker-project-examples)default_network#211, ConfigRenderer::render_compose omits top-level volumes: block, breaking services with named volumes (same class as #211) #236 (same general area — compose/network rendering divergence between different generation code paths)