I’m experimenting with using the Events portion of the Remote API to react to containers being launched and I’m seeing some weird behavior. I’ve got a 2-box UCP cluster with one controller and one engine. When I set DOCKER_HOST on my engine to tcp://IP_OF_CONTROLLER:2376, I can run a ‘docker ps’ and see the containers on both boxes (the box name is prefixed in the NAMES column). So far, so good.
So now I do a ‘docker events’ on my engine box and, in another window, ‘docker run’ a test container with a constraint to run it on the UCP controller and I see events print out. Great!
Now I launch the same image but constrained to start the container on the engine instead of the UCP controller. The container starts properly and shows in a ‘docker ps’ but my events window shows no new events.
Am I misunderstanding how this is supposed to work or is something actually broken? I would expect events on any swarm box to propagate up to the controller and get sent to my ‘docker events’ screen.