Skip to content

docker events --filter container=foo is broken as of 1.9.0 #18453

@bjaglin

Description

@bjaglin

When running docker events with a container filter, nothing is received, even though events from a container with that name are received by the daemon. This is a regression from 1.8.3.

bjaglin@t440s:/tmp$ docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      linux/amd64
bjaglin@t440s:/tmp$ docker info
Containers: 1
Images: 14
Server Version: 1.9.1
Storage Driver: overlay
 Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.2.0-18-generic
Operating System: Ubuntu 15.10
CPUs: 4
Total Memory: 11.64 GiB
Name: t440s
ID: 4CO2:NGIJ:KC6L:MBYG:BXNH:DRJK:GM5J:LQHT:H6QD:7RA2:FX2O:NRXF
WARNING: No swap limit support
bjaglin@t440s:/tmp$ uname -a
Linux t440s 4.2.0-18-generic #22-Ubuntu SMP Fri Nov 6 18:25:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Actual:

bjaglin@t440s:/tmp$ docker events --filter container=foo &
[1] 17134
bjaglin@t440s:/tmp$ docker run --rm --name foo alpine echo hello world
hello world
bjaglin@t440s:/tmp$ fg
docker events --filter container=foo

Expected (1.8.3 behavior):

bjaglin@t440s:/tmp$ docker events --filter container=foo &
[1] 30008
bjaglin@t440s:/tmp$ docker run --rm --name foo alpine echo hello world2015-12-06T00:24:18.000000000+01:00 9c683202e1fe738111261e9601421c31bfe53b7926f52bbcb941238da0a96cc8: (from alpine) create
2015-12-06T00:24:18.000000000+01:00 9c683202e1fe738111261e9601421c31bfe53b7926f52bbcb941238da0a96cc8: (from alpine) attach
2015-12-06T00:24:19.000000000+01:00 9c683202e1fe738111261e9601421c31bfe53b7926f52bbcb941238da0a96cc8: (from alpine) start
hello world
2015-12-06T00:24:19.000000000+01:00 9c683202e1fe738111261e9601421c31bfe53b7926f52bbcb941238da0a96cc8: (from alpine) die
bjaglin@t440s:/tmp$ fg
docker events --filter container=foo

Issue reproducible on 1.9.0, 1.9.1 & experimental (20151205).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions