Features04 Nodes

Take a node out, and know what moves.

Every node with its role, availability, state, address, engine and labels, and its capacity, disk and images. Drain one for maintenance with a preview first, clean up what nothing uses, promote or demote with a warning about the quorum, and add a node without the join token ever showing.

Fig. — Nodes, with the menu of martijn-server: drain, pause, promote, labels, and remove once it is down.

What you can do

Every node

The nodes with their role, the leader, availability, state, address, engine version, number of tasks and labels.

Capacity

The CPUs and memory a node has, next to what the reservations of its tasks take: that is what the scheduler plans with. A task that waits because its reservation fits nowhere says what it needs and where the most is free.

Disk space

How full the file system is where Docker keeps its data on each node, measured through the Docker context of that node by a short-lived helper container that runs df (read-only, without a network). Disk space shows what takes the room, images, containers, volumes and build cache, and how much of it nothing uses.

Clean up

Stopped containers, images that no container uses and build cache that nothing uses, on one node or on all nodes at once, with first how many there are and how much it frees. Volumes stay; remove an unused one on the Volumes page.

Images per node

Images in the sidebar: the images on every node, read through its Docker context, with their repository, tag, digest, size, when they were made, and the services and tasks that use them, also through a stopped container. Images that nothing uses and images without a name stand out.

Same name, other image

Group by node or by image. Per image you see on which nodes it is, and differs when another node has a different image under the same name. A node that is down is named above the list; one that does not answer does not hold up the rest.

Pull again

Pull an image again on one node, or on all nodes or a choice of them, with the version on each node. An image from a registry that needs a login is pulled with the login from docker login, and a name without a tag as :latest.

Remove an unused image

Remove one image or several, only when no container uses them, after you confirm.

Drain for maintenance

Before you update the kernel and reboot a node, drain it. The preview lists the tasks that move to another node, those that stop (global services run on every node), and those that cannot run anywhere else because of their placement constraints or host-mode ports.

Pause

A paused node keeps its tasks running, but gets no new ones.

Promote and demote

With a warning when the change leaves an even number of managers, removes the only manager, demotes the leader, or demotes the node the app is connected to.

Labels

Labels for placement constraints, such as node.labels.disk==ssd.

Add a node

Pick another Docker context, and the app lets that machine join as a worker or a manager; the join token does not appear in the window. A machine without a context yet (ssh://… or tcp://…) is first saved as a Docker context. Or copy the join command and run it on the machine yourself.

Remove a node

A node that is down can be removed from the swarm.

Diagnose the engine

The app looks on the host itself, outside Docker: as root in the WSL distro, or over ssh with your keys. It reads systemd, the journal of the last attempt, dockerd --validate, daemon.json, the disk, the pid file and who listens on which port, and recognises the usual causes. For each it shows the line it saw and a command to copy; some it repairs when you ask, after it says exactly what it will do.

Drain

Draining the node your database is tied to? The preview says so.

A replica that is tied to one node by its placement constraints has nowhere else to go. The preview lists it in red before anything happens, next to the tasks that will move. Afterwards, set the node to active again and rebalance the services that should spread out.

Fig. — Draining martijn-server: whoami moves, the MongoDB member tied to this node cannot run anywhere else.

Images

docker image ls sees one node. Each node pulls its own.

Each node pulls the images of its own tasks, so the same tag can be a different image on another node. The Images page reads every node through its Docker context: per image on which nodes it is, which services use it there, and differs when a node has another digest under that name. Pull it again where it is old, or remove it where nothing uses it.

Fig. — Images by image: one tag on two nodes, in use on one of them, and another tag of the same image on WSL.

All features

Try it on your own swarm.
Free, with the source on Codeberg. An installer for Windows 10 and 11 that installs nothing on the swarm.
Download for Windows
Version 1.8.0 · Docker-Swarm-MX-Setup.exe