-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Skip redundant endpoints in "network inspect" #1969
Comments
@mavenugo Currently Swarm each engine overlay network manifest includes every container local, remote, or stale. Say there are
|
@mavenugo I feel like listing remote and stale containers should be optional. Doesn't it make sense to have default network command not to return them? You can add an option to show them. It'd make it clean for existing tools. |
@dongluochen Swarm master infact reflects the cluster state and not the local state. But the Stale endpoints are never seen either in swarm or engine level... The main intention of moby/moby#21160 is to identify a stale endpoint. unfortunately at the engine level, it will not know if an endpoint is a remote endpoint or a stale endpoint. But Swarm can (due to his global view of containers that are alive). And that is the exact purpose of this Issue. Swarm has the ability to see all the containers that are connected to an overlay network across the cluster and hence it can filter out any redundant That is the reason this is not an optional entity. |
@mavenugo I'm not sure of that. Today overlay network is control with The weird thing here is that a node is reporting endpoints that doesn't belong to it. Also the search space jumps from linear to quadratic. |
@dongluochen that's absolutely fine. If someone is deploying that way, then swarm's
That's not true, in a multi-host scenario, every endpoint that is attached to a network is in global space due to the necessary service discovery and endpoints doesn't belong to a particular node. Whereas a container certainly belong to a particular node at a given point in time. Since an endpoint is 1:1 mapped to container, it inherits the container properties and the states are very similar for a particular network. But once we move to a service level construct, service becomes a global entity and this discussion doesn't arise. |
@mavenugo : Currently, I 'm using Docker 1.12.2 with standalone Swarm. I'm not using Swarm mode. The strange thing is that when I "disconnect" anyone of them from the overlay, and I run "docker inspect...", again immediately, I see something like this: If run "docket network inspect" again 1-2 secs later, the "ep-10b4a9f2fcdeef5c9df992ab058b092318578eefedab590f1effb539f92b3a5d" entry went away... Q: Is this the correct behaviour?. Has any of the subsequent release of 1.12.x or even 1.13 fixed this? Thx, |
With moby/moby#21160, docker engine will return all the endpoints (local, remote & stale endpoints). The remote and stale endpoints will have be represented as
ep-{endpoint-id}
. Example output from a host that doesn't own this endpoint (which represents the remote container).This would cause duplicate endpoints in the
docker network inspect
output when executed in a swarm environment.The fix is to skip such duplicate endpoints. But make sure the stale endpoints (which will not have a duplicate endpoint-id) should be returned.
The text was updated successfully, but these errors were encountered: