Docker Community Forums

Share and learn in the Docker community.

`docker ps --filter` does not work against UCP endpoint


(Alm. Brand Docker admins) #1

Continuing the discussion from Upgrade swarm to 1.1.0 instead of 1.1.0-rc2?:

I still get the following error message when using the --filter option against UCP 1.0.0:

Error response from daemon: json: cannot unmarshal object into Go value of type []string

To reproduce:

  1. point to UCP using env.sh from bundle
  2. docker run --detach --name temp --label com.example.mylabel=value busybox top
  3. docker ps --filter label=com.example.mylabel=value

Expected output:

CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS              PORTS               NAMES
aaa2338419ec        busybox             "top"               About a minute ago   Up About a minute                       redacted/temp

If I first evaluate env.sh and then change DOCKER_HOST to point to port 2376 (exposed by the ucp-swarm-manager container), I can successfully execute the command - but I believe this is only because I’m an admin.


(Vivek Saraswat) #2

Hi almdocker,

Thanks for pointing this out, dev team is aware of the issue and working on a fix.


(Selvik) #3

Hi vsaraswat,

Is there an associated (or related) github issue I can track - so I will know as soon as there is a fix for this issue? I’d also like to try to workaround the issue if I know the root cause - so can you tell us more?

Thanks!
-Selvi


(Alm. Brand Docker admins) #4

The closest I can get to a root cause is that the interface exposed by UCP does not handle --filter options correctly. A workaround is, like I mentioned in my original post, to point at the backing Swarm address, but non-admin users’ cert bundles are positively denied access to that endpoint (for obvious reasons), so the workaround may not be applicable in your case.


(Alm. Brand Docker admins) #5

I can confirm that the issue is still present in UCP 1.0.1:

$ docker $(docker-machine config <redacted>) version
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 21:40:35 2016
 OS/Arch:      linux/amd64

Server:
 Version:      ucp/1.0.1
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   ef7f862
 Built:        
 OS/Arch:      linux/amd64
$ docker $(docker-machine config <redacted>) info                                                                                                                                                    
Containers: 65
 Running: 38
 Paused: 0
 Stopped: 27
Images: 388
Server Version: swarm/1.1.3
Role: primary
Strategy: spread
Filters: health, port, dependency, affinity, constraint
Nodes: 2
 <redacted>: <redacted>:12376
  β”” Status: Healthy
  β”” Containers: 33
  β”” Reserved CPUs: 0 / 2
  β”” Reserved Memory: 0 B / 16.46 GiB
  β”” Labels: executiondriver=native-0.2, kernelversion=3.16.0-30-generic, operatingsystem=Ubuntu 14.04.3 LTS, storagedriver=aufs
  β”” Error: (none)
  β”” UpdatedAt: 2016-03-11T12:57:42Z
 <redacted>: <redacted>:12376
  β”” Status: Healthy
  β”” Containers: 32
  β”” Reserved CPUs: 0 / 2
  β”” Reserved Memory: 0 B / 16.46 GiB
  β”” Labels: executiondriver=native-0.2, kernelversion=3.16.0-30-generic, operatingsystem=Ubuntu 14.04.3 LTS, storagedriver=aufs
  β”” Error: (none)
  β”” UpdatedAt: 2016-03-11T12:57:13Z
Cluster Managers: 1
 <redacted>: Healthy
  β”” Orca Controller: https://<redacted>:443
  β”” Swarm Manager: tcp://<redacted>:2376
  β”” KV: etcd://<redacted>:12379
Plugins: 
 Volume: 
 Network: 
Kernel Version: 3.16.0-30-generic
Operating System: linux
Architecture: amd64
CPUs: 4
Total Memory: 32.91 GiB

(Vivek Saraswat) #6

Hi almdocker/selvik

This is being worked on right now, unfortunately the fix didn’t make the 1.0.1 release. Keep a look out in the next version.

There is no particular github issue although you can open up a ticket through our Support team.


(Alm. Brand Docker admins) #7

Hi Vivek,

I know the past couple of releases since 1.0.1 were perhaps mainly bug/security fixes, but is there any status on the progress on fixing this issue?


(Vivek Saraswat) #8

Apologies for the delay, it took a bit of rewiring under the hood so it didn’t make it into the security fix patches. You can expect the fix in the next UCP release.


(Alm. Brand Docker admins) #9

Sounds great! :slight_smile: Should I ask here or in commercial support for an ETA?


(Alm. Brand Docker admins) #10

All is well in UCP 1.1.0 :slight_smile: