Skip to content

no such service in Compose v2.3.2 when running/stopping services from multiple Compose files #9249

@antoineco

Description

@antoineco

Description

Compose v2.3.2 still seems to be struggling when juggling with services defined in multiple Compose files, and yields no such service: https://github.com/deviantony/docker-elk/runs/5473593690?check_suite_focus=true

Steps to reproduce the issue:

In the above example, taken from a CI run, I ran the following commands inside the repository https://github.com/deviantony/docker-elk:

docker compose up -d
docker compose -f docker-compose.yml -f extensions/logspout/logspout-compose.yml up -d logspout
docker compose -f docker-compose.yml -f extensions/logspout/logspout-compose.yml ps
docker compose -f docker-compose.yml -f extensions/logspout/logspout-compose.yml logs logspout
docker compose -f docker-compose.yml -f extensions/logspout/logspout-compose.yml stop logspout
docker compose stop logstash

The last stop caused the aforementioned error. (The logstash service is defined inside the main docker-compose.yml file)

Describe the results you received:

no such service: logstash

Describe the results you expected:

A success, like in v2.2 and below.

Additional information you deem important (e.g. issue happens only occasionally):

I started noticing this along with the error described in #9234.
The no such project error went away. However, the no such service error is still present in the latest version.

Output of docker compose version:

Docker Compose version v2.3.2

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., 0.7.1+azure)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 16
 Server Version: 20.10.11+azure-3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d71fcd7d8303cbf684402823e425e9dd2e99285d
 runc version: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
 init version:
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.11.0-1028-azure
 Operating System: Ubuntu 20.04.4 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 6.791GiB
 Name: fv-az246-706
 ID: 2AHL:VS5Y:FHVP:G5QA:R65P:TYUO:TK4L:YHNR:YZAY:BOMQ:TCBV:H3Y2
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: githubactions
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions