Skip to content

Commit 8960a64

Browse files
authored
Log node identity at startup (#85773)
At startup we construct a `DiscoveryNode` which identifies the local node, and we report various components of this identity in the startup logs. You can often deduce other parts (e.g. the ephemeral and persistent node IDs) from other logs, but this is hard to do reliably. With this commit we report the node identity in full at startup to avoid any ambiguity. Relates #83034, #85721, and other test failures explainable by mistaken identities.
1 parent dfb39f5 commit 8960a64

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/changelog/85773.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 85773
2+
summary: Log node identity at startup
3+
area: Network
4+
type: enhancement
5+
issues: []

server/src/main/java/org/elasticsearch/node/Node.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ public void onTimeout(TimeValue timeout) {
12671267
}
12681268
}
12691269

1270-
logger.info("started");
1270+
logger.info("started {}", transportService.getLocalNode());
12711271

12721272
pluginsService.filterPlugins(ClusterPlugin.class).forEach(ClusterPlugin::onNodeStarted);
12731273

0 commit comments

Comments
 (0)