Files
mesh-catalog/modules/hostname
jschoubben 3e08301b27
mesh/delivery-group group feat/judge-once rejected: composed together: the checker's verdict at the members' heads (5c42ba1fb5f3): integration: artifactstoreto…
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: integration: artifactstoretools/cmd/artifa… | 3e08301b27ea on 4b16c193f0fb | judged by the candidate's mesh-build-go at 8dd51540f73a
Pin every module to the group's mesh-sdk head after the gofmt fix
Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
2026-11-01 03:30:59 +01:00
..

hostname

The machine's names (novox/hq ADR 0199, ADR 0223): it holds the node seat node-hostname and owns the two files that say what a machine is called — /etc/hostname and the machine's own lines in /etc/hosts. It was hosts, holding node-hosts-file; the seat was renamed, and the old name resolves to it as an alias.

What it writes

  • /etc/hostname, whole: the module's hostname setting, and nothing else. There is no default. A machine's name is the operator's: the mesh's name for a machine and the name it calls itself need not be the same, and writing the mesh's name silently would rename a machine. Set it per machine — settings set hostname '{"hostname": "<name>"}' --node <node> — before the module is assigned there; without it the module is left out of that machine's declaration, naming the key. A mesh-wide {"hostname": "${machine:name}"} makes every machine call itself by its mesh name, and a machine's own setting still overrides it.
  • The machine's own lines in /etc/hosts, as the mesh's marked region at the start of the file: localhost and 127.0.1.1 with the machine's mesh name. Every other line is the operator's, kept byte for byte and given back when the module goes.

When a new name takes effect

At the machine's next boot. The kernel's name is set from /etc/hostname when the machine starts; writing the file changes what hostnamectl reports as the static name and nothing that is running. The module declares nothing that would set it live: a graphical session's X authority is keyed by the name the session started under, so changing it underneath a running session refuses every new window until the person logs in again. Reboot when that is acceptable, or run hostnamectl hostname <name> by hand.

Its verbs

<node>/node-hostname.entries, .add and .remove: the hosts file's lines, each marked whose it is; add one address and its names to the operator's lines; remove a name or an address from them. They change the machine's file and nothing else. /etc/hostname has no verb — it is the setting.