docker events command doesn't work with swarm #1203
Comments
Hi @garagatyi, thanks for reporting. It just seems like |
Looking at the code, it's set up to stream the events as they come in. Getting events in the past, using
I do not have any ideas for |
@MHBauer can you try to implement Thanks! |
Yes, I will give |
Thank you |
@MHBauer can you look at |
@vieux I can try. How do you think I should approach the problem? Since (ha!) we have to go back in time to get previously existing events, it doesn't fit with the way the events are currently set up, which works by streaming the events live from the engines. |
Nah, I don't think we can do |
Right, we don't want to store events but I think the engine stores a few events (maybe up to 64) so we could try to support since and call since on the underlying engines. Not sure it's useful though |
Oh yeah, if there's a limit, then we could store those even in memory in our events struct |
Hi , I opened issue #1504 which relates to this subject... is this scheduled to be handled in next version? do you need more input? Thanks, |
Sorry, I missed the conversation. I'll take a look at the events struct. |
@aluzzardi @vieux I don't think 64 events pool will work when a lot of containers are working in cluster. You showed 50K of containers at DockerCon. In this case 64 events worth nothing. |
@garagatyi as far as I understand its 64 events per host (node) and not per container, in DockerCon there were 1000 hosts (an extreme case), is storing 64K events in cache too much memory wise? (again this is not a common case)… BTW I don’t know the memory footprint of a single event… Options summary (as I see it) are:
|
@doronl Yes, I misunderstand @vieux, thank you.
I believe it's too much. But maybe @vieux or @aluzzardi have another opinion.
It can be improved by loop storage, so once client ask for events Swarm ask for events all nodes and save it in loop storage (on disk or memory) . When another client ask for events Swarm returns events from this storage. So I think that the easiest solution to implement will be loop + streaming without any cache. |
The problem just happens with a swarm, there is an open issue describing the problem: docker-archive/classicswarm#1203. Reducing the timer from 1 minutes to 15 seconds seems to alleviate the problem.
Why was this closed? did you implement the missing ‘since’ events functionality in the swarm API? as I mentioned in #1504 Thanks |
Sorry @doronl we just merged a PR related to events but you are right it doesn't fix the --since issue. Every engine stores 64 events in memory but it's true that swarm could store more, I'm going to try to PoC something. |
So is the PR opened somewhere? or should #1504 be reopened? … just to keep track of things Thanks |
I think that this issue should be closed. The purpose of it is to find explanation why origin command doesn't show events. Now we know that this is because of --since option. |
Any updates on this? |
Closing because |
I tried to run swarm in accordance to docs at https://docs.docker.com/swarm/install-w-machine/.
Docker events doesn't return anything. Here is how I check it:
Do you have any thoughts?
The text was updated successfully, but these errors were encountered: