up --scale not working on 2.0.1 · Issue #8752 · docker/compose (original) (raw)

Description

docker compose up --scale name=num always reports "unknown service: name"

Steps to reproduce the issue:

$ cat docker-compose.yml version: '3.8'

services: helloworld: image: alpine:edge entrypoint: /bin/echo Hello world scalable: image: alpine:edge entrypoint: /bin/echo Hello scalable $ docker-compose -v Docker Compose version 2.0.1 $ docker-compose up --scale scalable=0 -d helloworld unknown service "scalable"

With docker-compose version 1.29.2 it works as expected:

$ docker-compose -v docker-compose version 1.29.2, build unknown $ docker-compose up --scale scalable=0 -d helloworld Creating network "docker-compose-playground_default" with the default driver Creating docker-compose-playground_helloworld_1 ... done

Describe the results you received:

Error: unknown service "scalable"

Describe the results you expected:

scalable service will not be started, all others should

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

Output of docker compose version:

Docker Compose version 2.0.1

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.6.1-docker)
  compose: Docker Compose (Docker Inc., 2.0.1)

Server:
 Containers: 62
  Running: 28
  Paused: 0
  Stopped: 34
 Images: 170
 Server Version: 20.10.9
 Storage Driver: btrfs
  Build Version: Btrfs v5.14.1
  Library Version: 102
 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: 8686ededfc90076914c5238eb96c883ea093a8ba.m
 runc version: v1.0.2-0-g52b36a2d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.14.8-arch1-1
 Operating System: Arch Linux (containerized)
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 8EiB
 Name: prometheus
 ID: UF3N:TXOA:MZ3G:J37B:FM36:AW3W:RFP6:ODUX:4UAB:XYQE:6KZJ:EZRG
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: bomensal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpu shares support
WARNING: No cpuset support
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled