### CI Link

https://gradle-enterprise.elastic.co/s/oyi6h23yl6k3o/tests/:x-pack:qa:full-cluster-restart:v8.11.0%23bwcTest/org.elasticsearch.xpack.restart.CoreFullClusterRestartIT/testClusterState%20%7Bcluster=OLD%7D

### Repro line

./gradlew ':qa:full-cluster-restart:v8.11.0#bwcTest' -Dtests.class="org.elasticsearch.upgrades.FullClusterRestartIT"

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

This test assumes that the index created version in cluster state matches the old node version.

That is no longer true due to the introduction of `IndexVersion`

https://github.com/elastic/elasticsearch/blob/52a6820813577abcb23191d862a01e32e652ed42/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java#L435-L440
qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartIT.java
{
                    builder.startObject("persistent");
                    {
                        builder.field("cluster.remote.foo.seeds", Collections.singletonList("localhost:9200"));
                        builder.field("cluster.remote.foo.transport.compress", "true");
                    }
                    builder.endObject();
                }
                builder.endObject();
                putSettingsRequest.setJsonEntity(Strings.toString(builder));
            }
            client().performRequest(putSettingsRequest);
        } else {
            final Request getSettingsRequest = new Request("GET", "/_cluster/settings");
            final Response getSettingsResponse = client().performRequest(getSettingsRequest);
            try (XContentParser parser = createParser(JsonXContent.jsonXContent, getSettingsResponse.getEntity().getContent())) {
                final Settings settings = RestClusterGetSettingsResponse.fromXContent(parser).getPersistentSettings();
                assertThat(REMOTE_CLUSTER_COMPRESS.getConcreteSettingForNamespace("foo").get(settings), equalTo(Compression.Enabled.TRUE));
            }
        }
    }
    public static void assertNumHits(String index, int numHits, int totalShards) throws IOException {
        Map<String, Object> resp = entityAsMap(client().performRequest(new Request("GET", "/" + index + "/_search")));
        assertNoFailures(resp);
        assertThat(XContentMapValues.extractValue("_shards.total", resp), equalTo(totalShards));
        assertThat(XContentMapValues.extractValue("_shards.successful", resp), equalTo(totalShards));
        assertThat(extractTotalHits(resp), equalTo(numHits));
    }
}