### CI Link

https://gradle-enterprise.elastic.co/s/xe5tsxwd6ky64

### Repro line

./gradlew ':modules:reindex:internalClusterTest' --tests "org.elasticsearch.migration.SystemIndexMigrationIT.testSystemIndexMigrationCanBeInterruptedWithShutdown" -Dtests.seed=21ABF49FDF24F147 -Dtests.locale=ar-DZ -Dtests.timezone=Europe/Vatican -Druntime.java=17

### Does it reproduce?

No

### Applicable branches

8.0

### Failure history

Looks like the first time it has failed

### Failure excerpt

```
org.elasticsearch.migration.SystemIndexMigrationIT > testSystemIndexMigrationCanBeInterruptedWithShutdown FAILED
    java.lang.AssertionError: expected migration to fail due to restarting only data node
    Expected: <ERROR>
         but: was <NO_MIGRATION_NEEDED>
        at __randomizedtesting.SeedInfo.seed([21ABF49FDF24F147:5E92BED7875328A5]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.elasticsearch.migration.SystemIndexMigrationIT.lambda$testSystemIndexMigrationCanBeInterruptedWithShutdown$1(SystemIndexMigrationIT.java:119)
        at org.elasticsearch.test.ESTestCase.assertBusy(ESTestCase.java:1069)
        at org.elasticsearch.test.ESTestCase.assertBusy(ESTestCase.java:1042)
        at org.elasticsearch.migration.SystemIndexMigrationIT.testSystemIndexMigrationCanBeInterruptedWithShutdown(SystemIndexMigrationIT.java:110)
```
modules/reindex/src/internalClusterTest/java/org/elasticsearch/migration/SystemIndexMigrationIT.java
clusterService.addListener(clusterStateListener);
        
        final PostFeatureUpgradeRequest req = new PostFeatureUpgradeRequest();
        client().execute(PostFeatureUpgradeAction.INSTANCE, req);
        logger.info("migrate feature api called");
        taskCreated.await(10, TimeUnit.SECONDS); 
        internalCluster().restartNode(masterAndDataNode, new InternalTestCluster.RestartCallback() {
            @Override
            public Settings onNodeStopped(String nodeName) throws Exception {
                shutdownCompleted.await(10, TimeUnit.SECONDS);
                return super.onNodeStopped(nodeName);
            }
        });
        assertBusy(() -> {
            
            ClusterState clusterState = client().admin().cluster().prepareState().get().getState();
            assertThat("expected restarted node to rejoin cluster", clusterState.getNodes().size(), equalTo(2));
            GetFeatureUpgradeStatusResponse statusResponse = client().execute(
                GetFeatureUpgradeStatusAction.INSTANCE,
                new GetFeatureUpgradeStatusRequest()
            ).get();
            assertThat(
                "expected migration to fail due to restarting only data node",
                statusResponse.getUpgradeStatus(),
                equalTo(GetFeatureUpgradeStatusResponse.UpgradeStatus.ERROR)
            );
        });
    }
}