From a3e845cbad5399e023e398a6e005c36265969b69 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 15 May 2020 19:45:32 +0100 Subject: [PATCH] Suppress cluster UUID logs in 6.8/7.x upgrade (#56835) Today a 7.x node logs `cluster UUID set to [...]` on every cluster state update received from a 6.8 master, because 6.8 nodes are not able to commit the cluster UUID properly. We could try and deduplicate these logs somehow, but that would introduce a good deal of complexity. Instead, this commit suppresses these logs entirely when receiving cluster state updates from a 6.8 master. --- .../cluster/coordination/CoordinationState.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/coordination/CoordinationState.java b/server/src/main/java/org/elasticsearch/cluster/coordination/CoordinationState.java index b27da0b99eb..cb895000eb7 100644 --- a/server/src/main/java/org/elasticsearch/cluster/coordination/CoordinationState.java +++ b/server/src/main/java/org/elasticsearch/cluster/coordination/CoordinationState.java @@ -505,7 +505,12 @@ public class CoordinationState { metadataBuilder = Metadata.builder(lastAcceptedState.metadata()); } metadataBuilder.clusterUUIDCommitted(true); - logger.info("cluster UUID set to [{}]", lastAcceptedState.metadata().clusterUUID()); + + if (lastAcceptedState.term() != ZEN1_BWC_TERM) { + // Zen1 masters never publish a committed cluster UUID so if we logged this it'd happen on on every update. Let's just + // not log it at all in a 6.8/7.x rolling upgrade. + logger.info("cluster UUID set to [{}]", lastAcceptedState.metadata().clusterUUID()); + } } if (metadataBuilder != null) { setLastAcceptedState(ClusterState.builder(lastAcceptedState).metadata(metadataBuilder).build());