swarmexec v1.14.0 — addresses in the inspect NETWORKS section
The NETWORKS section of the inspect overlay listed which networks a
service is attached to and which DNS names resolve there, but never the
addresses behind them — the question it is most often opened for.
Answering it meant leaving the TUI for `docker service inspect` and
reading Endpoint.VirtualIPs by hand.
It now answers it on three levels:
NETWORKS
- gateway vip 10.0.2.32/24 (2 dns names)
gl_gitlab
tasks.gl_gitlab
- 1 container
gl_gitlab.1 10.0.2.125/24 docker3v2
- ingress vip 10.0.0.250/24 (routing mesh)
published 2222 -> 22/tcp
- 1 container
gl_gitlab.1 10.0.0.64/24 docker3v2
Collapsed, the row already carries the address: "vip" on a service — what
the swarm load balancer answers on — and "addr" on a task, its own address,
which until now only appeared hidden inside the expanded network.
Expanding once gives the DNS names as before plus a second collapsible
row; expanding that gives one column-aligned row per container with its
address and node. Copying inside NETWORKS yields the bare address without
its mask, the form that goes into a curl.
Which containers appear is filtered on the task's DESIRED state rather
than its current one: a task that is only preparing or starting already
holds its address, and during a rolling update that is most of them, so
filtering on the current state would empty the drill-down exactly when it
is most interesting. Such a task is listed with its state in brackets. A
task the manager has given up on is excluded — its address has been
released and may already belong to another container.
The ingress network gets a row too, although no spec mentions it: swarm
attaches a service to the routing mesh on its own as soon as it publishes
a port in ingress mode, and that VIP is the address the mesh answers on.
It is appended after the declared networks and lists the ingress-published
ports that put the service there; host-mode ports bypass the mesh and are
left out. A dnsrr service has no VIP by design and says so instead of
showing a blank.
Also: the "?" overlay gained a line for the network drill-down, and its
"u" entry no longer claims to only update to a NEWER image — it has set
any version since v1.13.0.
Docs updated in all five languages.