**Build scan:**
https://gradle-enterprise.elastic.co/s/3kgeffszun4bc/tests/:server:internalClusterTest/org.elasticsearch.discovery.DiscoveryDisruptionIT/testElectMasterWithLatestVersion

**Reproduction line:**
`./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.discovery.DiscoveryDisruptionIT.testElectMasterWithLatestVersion" -Dtests.seed=F89231CFEE83315B -Dtests.locale=mt -Dtests.timezone=US/Central -Druntime.java=18`

**Applicable branches:**
8.5

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.discovery.DiscoveryDisruptionIT&tests.test=testElectMasterWithLatestVersion

**Failure excerpt:**
```
java.lang.AssertionError: (No message provided)

  at org.junit.Assert.fail(Assert.java:86)
  at org.junit.Assert.assertTrue(Assert.java:41)
  at org.junit.Assert.assertFalse(Assert.java:64)
  at org.junit.Assert.assertFalse(Assert.java:74)
  at org.elasticsearch.test.InternalTestCluster.validateClusterFormed(InternalTestCluster.java:1215)
  at org.elasticsearch.test.disruption.NetworkDisruption.ensureNodeCount(NetworkDisruption.java:109)
  at org.elasticsearch.test.disruption.NetworkDisruption.ensureHealthy(NetworkDisruption.java:82)
  at org.elasticsearch.test.disruption.NetworkDisruption.removeAndEnsureHealthy(NetworkDisruption.java:74)
  at org.elasticsearch.test.InternalTestCluster.clearDisruptionScheme(InternalTestCluster.java:2260)
  at org.elasticsearch.test.InternalTestCluster.clearDisruptionScheme(InternalTestCluster.java:2251)
  at org.elasticsearch.discovery.DiscoveryDisruptionIT.testElectMasterWithLatestVersion(DiscoveryDisruptionIT.java:137)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:577)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:833)

```

In the test logs I spotted this suspicious stack trace:
```
Ott 03, 2022 1:45:01 QN com.carrotsearch.randomizedtesting.RandomizedRunner$QueueUncaughtExceptionsHandler uncaughtException |  
-- | --
  | WARNING: Uncaught exception in thread: Thread[elasticsearch[node_t0][clusterApplierService#updateTask][T#1],5,TGRP-DiscoveryDisruptionIT] |  
  | java.lang.AssertionError: liveNodes = [{node_t2}{UBE2zS4uR6SQmguTCmRwVg}{-RlVOrZ9QcCNAVcR_fDEVA}{node_t2}{127.0.0.1}{127.0.0.1:24253}{cdfhilmrstw}, {node_t1}{328qiG97TgSr7VG2zE4low}{uMGWvP7bTPqmBsuHVIkiyg}{node_t1}{127.0.0.1}{127.0.0.1:24252}{cdfhilmrstw}] master = {node_t0}{W2Kqnf8UThq4eWj2rQXaqQ}{ocPW-ypEQxWtzAECkJdKSA}{node_t0}{127.0.0.1}{127.0.0.1:24251}{cdfhilmrstw} |  
  | at __randomizedtesting.SeedInfo.seed([F89231CFEE83315B]:0) |  
  | at org.elasticsearch.cluster.coordination.Reconfigurator.reconfigure(Reconfigurator.java:91) |  
  | at org.elasticsearch.cluster.coordination.Coordinator.improveConfiguration(Coordinator.java:1243) |  
  | at org.elasticsearch.cluster.coordination.Coordinator.scheduleReconfigurationIfNeeded(Coordinator.java:1296) |  
  | at org.elasticsearch.cluster.coordination.Coordinator$CoordinatorPublication$4$1.onResponse(Coordinator.java:1857) |  
  | at org.elasticsearch.cluster.coordination.Coordinator$CoordinatorPublication$4$1.onResponse(Coordinator.java:1797) |  
  | at org.elasticsearch.cluster.service.ClusterApplierService$ClusterApplyActionListener.onResponse(ClusterApplierService.java:595) |  
  | at org.elasticsearch.cluster.service.ClusterApplierService$ClusterApplyActionListener.onResponse(ClusterApplierService.java:566) |  
  | at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:438) |  
  | at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:154) |  
  | at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:825) |  
  | at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:257) |  
  | at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:223) |  
  | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) |  
  | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) |  
  | at java.base/java.lang.Thread.run(Thread.java:833)
```

server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java
+ "] when local node "
                        + getLocalNode()
                        + " does not have quorum in voting configuration "
                        + votingConfiguration
                );
            }
            ClusterState initialState = ClusterState.builder(ClusterName.CLUSTER_NAME_SETTING.get(settings))
                .blocks(
                    ClusterBlocks.builder()
                        .addGlobalBlock(STATE_NOT_RECOVERED_BLOCK)
                        .addGlobalBlock(noMasterBlockService.getNoMasterBlock())
                )
                .nodes(DiscoveryNodes.builder().add(getLocalNode()).localNodeId(getLocalNode().getId()))
                .build();
            applierState = initialState;
            clusterApplier.setInitialState(initialState);
        }
    }
    public DiscoveryStats stats() {
        return new DiscoveryStats(
            new PendingClusterStateStats(0, 0, 0),
            publicationHandler.stats(),
            getLocalNode().isMasterNode() ? masterService.getClusterStateUpdateStats() : null,
            clusterApplier.getStats()
        );
    }
    public void startInitialJoin() {
        synchronized (mutex) {
            becomeCandidate("startInitialJoin");
        }