Skip to content

docker servcie ps <service_name> lists all instances of services with names starting with service_name #32556

@fhauptmann

Description

@fhauptmann

Description

On Docker 1.17.04 "docker service ps <service_name>" not only lists all instaces of the service named <service_name> but additionally lists all services with names starting with <service_name>.

Steps to reproduce the issue:

  1. Create a docker swarm
  2. Login to a swarm manager
  3. $ docker service ps app_partner

Describe the results you received:
$ sudo docker service ps "app_partner"
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
hhip3olcnga3 app_partner-data.1 lop-ueb-docker-01:15000/partner-data:17.56.90b0b6d dockerhost-06.mydomain Running Running 34 minutes ago
o35af2w7gf2s app_partner-prozess.1 lop-ueb-docker-01:15000/partner-prozess:17.25.48bb90b dockerhost-07..mydomain Running Running 38 minutes ago
zesd22nicdc2 app_partner-data.1 lop-ueb-docker-01:15000/partner-data:17.55.f8f6f23 dockerhost-06..mydomain Shutdown Shutdown 34 minutes ago
zll16gs64ris app_partner-suche.1 lop-ueb-docker-01:15000/partner-suche:17.42.a5d2592 dockerhost-07..mydomain Running Running 21 hours ago
ldorwz8fup88 app_partner-prozess.1 lop-ueb-docker-01:15000/partner-prozess:17.24.48bb90b dockerhost-05..mydomain Shutdown Shutdown 38 minutes ago
wu0n4fbbch24 app_partner-data.1 lop-ueb-docker-01:15000/partner-data:17.54.f8f6f23 dockerhost-06..mydomain Shutdown Shutdown 39 minutes ago

Describe the results you expected:
$ docker --version
Docker version 1.13.1, build 092cba3

$ sudo docker service ps app_partner
Error: No such service: app_partner

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

Output of docker version:

Docker version 17.04.0-ce, build 4845c56

Output of docker info:

Containers: 22
Running: 13
Paused: 0
Stopped: 9
Images: 23
Server Version: 17.04.0-ce
Storage Driver: overlay
Backing Filesystem: xfs
Supports d_type: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: active
NodeID: buc0o3zmn249mi513g9hbpm27
Is Manager: true
ClusterID: pkof2yjm986ej2f76liebg5vt
Managers: 3
Nodes: 3
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: X.X.1.115
Manager Addresses:
X.X.1.115:2377
X.X.1.116:2377
X.X.1.117:2377
Runtimes: runc
Default Runtime: runc
Init Binary:
containerd version: 422e31ce907fd9c3833a38d7b8fdd023e5a76e73
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-514.6.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.51GiB
Name: dockerhost-05.mydomain
ID: E2U6:M6ET:CP6Q:GQMF:4YRH:A6YV:E6QK:POST:BA5L:KONL:XPPD:3JUB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
registry-01:15000
127.0.0.0/8
Live Restore Enabled: false

WARNING: overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior.
Reformat the filesystem with ftype=1 to enable d_type support.
Running without d_type support will not be supported in future releases.
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Additional environment details (AWS, VirtualBox, physical, etc.):

Virtual Machine is running on OpenStack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/swarmkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.version/17.04

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions