Skip to content

agent: server ID in banner should be persistent - #28276

Merged
tgross merged 1 commit into
mainfrom
nmd1644-node-id-logging
Jul 22, 2026
Merged

tgross merged 1 commit into
mainfrom
nmd1644-node-id-logging

Conversation

@tgross

@tgross tgross commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

During agent startup on a server, we log the server node ID in the banner. But instead of using the node ID we got during the initial setup (or from the persistent ID on disk), we regenerate the ID. In fact, we regenerate the entire configuration for the purpose of displaying this one log line and then throw it out!

Fix this by using the node ID already available on the server.

Testing & Reproduction steps

$ nomad server members -json | jq '.[0].Tags.id'
"3d90ad98-70a1-7366-9e30-b980c4bea01c"

Logs:

==> Loaded configuration from /home/tim/ws/nomad/etc/local/server.hcl
==> Starting Nomad agent...
==> Nomad agent configuration:

       Advertise Addrs: HTTP: 192.168.1.194:4646; RPC: 192.168.1.194:4647; Serf: 192.168.1.194:4648
            Bind Addrs: HTTP: [0.0.0.0:4646]; RPC: 0.0.0.0:4647; Serf: 0.0.0.0:4648
                Client: false
             Log Level: debug
               Node Id: 3d90ad98-70a1-7366-9e30-b980c4bea01c
                Region: philly (DC: dc1)
                Server: true
               Version: 2.0.5-dev

Logs after restart:

==> Nomad agent configuration:

       Advertise Addrs: HTTP: 192.168.1.194:4646; RPC: 192.168.1.194:4647; Serf: 192.168.1.194:4648
            Bind Addrs: HTTP: [0.0.0.0:4646]; RPC: 0.0.0.0:4647; Serf: 0.0.0.0:4648
                Client: false
             Log Level: debug
               Node Id: 3d90ad98-70a1-7366-9e30-b980c4bea01c
                Region: philly (DC: dc1)
                Server: true
               Version: 2.0.5-dev

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing see above
  • Documentation n/a
  • LLM Usage n/a

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

During agent startup on a server, we log the server node ID in the banner. But
instead of using the node ID we got during the initial setup (or from the
persistent ID on disk), we regenerate the ID. In fact, we regenerate the entire
configuration for the purpose of displaying this one log line and then throw it
out!

Fix this by using the node ID already available on the server.
@tgross
tgross force-pushed the nmd1644-node-id-logging branch from d155498 to 4a5cd22 Compare July 21, 2026 22:15
@tgross tgross added backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/ent/1.11.x+ent backport to 1.11.x+ent release line backport/2.0.x backport to 2.0.x release line labels Jul 21, 2026
@tgross tgross added this to the 2.0.x milestone Jul 21, 2026
@tgross
tgross marked this pull request as ready for review July 21, 2026 22:18
@tgross
tgross requested review from a team as code owners July 21, 2026 22:18

@jrasell jrasell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgross
tgross merged commit 3ba88f4 into main Jul 22, 2026
46 checks passed
@tgross
tgross deleted the nmd1644-node-id-logging branch July 22, 2026 12:48
schmichael pushed a commit to vercel/nomad that referenced this pull request Sep 25, 2026
During agent startup on a server, we log the server node ID in the banner. But
instead of using the node ID we got during the initial setup (or from the
persistent ID on disk), we regenerate the ID. In fact, we regenerate the entire
configuration for the purpose of displaying this one log line and then throw it
out!

Fix this by using the node ID already available on the server.

This branch was successfully deployed

1 active deployment
Preview — 4a5cd224 Deployed Jul 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/ent/1.11.x+ent backport to 1.11.x+ent release line backport/2.0.x backport to 2.0.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants