Expand description
Resolves the 6 byte MAC address that identifies this node.
The MAC becomes part of the node identity embedded in v1 UUIDs (spool ids, node ids) and is reported in machine info. It must be distinct between hosts. The naive “first interface the OS lists” choice is unreliable: on cloud and containerized hosts it frequently selects a virtual device (a container bridge, a veth pair) whose address is identical across otherwise separate machines, which then produces colliding node identities.
To avoid that, resolution accepts explicit operator overrides and, failing those, prefers a physical interface over a virtual one. One cached value is shared by every consumer so the id embedded in spool ids and the address shown in machine info always agree.
Functions§
- get_
mac_ address - Returns the MAC address that identifies this node. The value is resolved once on first use and cached for the lifetime of the process. Any environment overrides must be set before this is first called.