### CI Link

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+main+intake+multijob+part2/1595/

### Repro line

./gradlew ':x-pack:plugin:ml:internalClusterTest' --tests "org.elasticsearch.xpack.ml.integration.BasicDistributedJobsIT.testMaxConcurrentJobAllocations" -Dtests.seed=E48924E90B3F1377 -Dtests.locale=uk -Dtests.timezone=America/Buenos_Aires -Druntime.java=17	

### Does it reproduce?

No

### Applicable branches

main

### Failure history

https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=America/New_York&tests.container=org.elasticsearch.xpack.ml.integration.BasicDistributedJobsIT&tests.test=testMaxConcurrentJobAllocations#

### Failure excerpt

```
java.lang.AssertionError: failed to reach a stable cluster of [1] nodes. Tried via [node_t1]. last cluster state:
cluster uuid: 9-Icde1wQe63LmAydfCZ5g [committed: true]
version: 100
state uuid: yN2WdFYrTkSdo-L05dzVlQ
from_diff: false
meta data version: 96
   coordination_metadata:
      term: 1
      last_committed_config: VotingConfiguration{Z4aoXlh2TXKVCEWtKIJzzA}
      last_accepted_config: VotingConfiguration{Z4aoXlh2TXKVCEWtKIJzzA}
      voting tombstones: []
   [.ml-state-000001/AWwTMzJESKaV_52vn1dtxA]: v[10], mv[1], sv[2], av[1]
      0: p_term [1], isa_ids [KcCy0rkvT5mLufoAFDX9-g]
   [.ml-config/8zXV2ILbSoG0skmxToSIzg]: v[6], mv[1], sv[2], av[1]
      0: p_term [1], isa_ids [q6J6GNBBRE-MNFa_LGIYHQ]
   [.ml-annotations-000001/X-MTYAfNQBeUl-FHIlp4nQ]: v[9], mv[1], sv[2], av[2]
      0: p_term [1], isa_ids [rIdHlAQLQP-SPjpYc5yn9g]
   [.ml-notifications-000002/KIf_GbieSbq7betKw3ssiQ]: v[6], mv[1], sv[2], av[1]
      0: p_term [1], isa_ids [ZSnjORR9SM2hlRTtWbSM3w]
   [.ml-anomalies-shared/dXYGfxkuSlyH6EJZFWBN2g]: v[66], mv[1], sv[2], av[21]
      0: p_term [1], isa_ids [sMvt-Go_S5ilViXUQSJj-g]
metadata customs:
   index_lifecycle: {
  "policies" : {
    ".monitoring-8-ilm-policy" : {
      "policy" : {
        "phases" : {
```
x-pack/plugin/ml/src/internalClusterTest/java/org/elasticsearch/xpack/ml/integration/BasicDistributedJobsIT.java
);
        ensureStableCluster(2);
        assertBusy(() -> {
            
            
            assertJobTask(jobId, JobState.OPENED, false);
        });
        logger.info("start ml node");
        internalCluster().startNode(addRoles(Set.of(DiscoveryNodeRole.ML_ROLE)));
        ensureStableCluster(3);
        assertBusy(() -> {
            
            assertJobTask(jobId, JobState.OPENED, true);
        });
    }
    public void testMaxConcurrentJobAllocations() throws Exception {
        int numMlNodes = 2;
        internalCluster().ensureAtMostNumDataNodes(0);
        
        logger.info("Start non ml node:");
        String nonMlNode = internalCluster().startNode(removeRoles(Set.of(DiscoveryNodeRole.ML_ROLE)));
        logger.info("Starting ml nodes");
        internalCluster().startNodes(numMlNodes, onlyRole(DiscoveryNodeRole.ML_ROLE));
        ensureStableCluster(numMlNodes + 1);
        int maxConcurrentJobAllocations = randomIntBetween(1, 4);
        client().admin()
            .cluster()
            .prepareUpdateSettings()
            .setPersistentSettings(Settings.builder().put(MachineLearning.CONCURRENT_JOB_ALLOCATIONS.getKey(), maxConcurrentJobAllocations))
            .get();