### CI Link

https://gradle-enterprise.elastic.co/s/u2lcxs24nfi2q/tests/:x-pack:qa:full-cluster-restart:v8.4.3%23bwcTest/org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT/testDeploymentSurvivesRestart%20%7Bcluster=UPGRADED%7D?expanded-stacktrace=WyIwIl0&page=eyJvdXRwdXQiOnsiMCI6MX19&top-execution=1

### Repro line

./gradlew ':x-pack:qa:full-cluster-restart:v8.4.3#bwcTest' -Dtests.class="org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT" -Dtests.method="testDeploymentSurvivesRestart {cluster=UPGRADED}" -Dtests.seed=498A9316A1FD5CFF -Dtests.bwc=true -Dtests.locale=cs-CZ -Dtests.timezone=Asia/Yangon -Druntime.java=17

### Does it reproduce?

No

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

{"error":{"root_cause":[{"type":"status_exception","reason":"Trained model [trained-model-full-cluster-restart] is not initialized"}],"type":"status_exception","reason":"Trained model [trained-model-full-cluster-restart] is not initialized","caused_by":{"type":"status_exception","reason":"Trained model [trained-model-full-cluster-restart] is not initialized"}},"status":409} 


at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:347) 
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:313)  
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:288)  
at org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT.infer(MLModelDeploymentFullClusterRestartIT.java:220) at org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT.assertInfer(MLModelDeploymentFullClusterRestartIT.java:132) at org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT.testDeploymentSurvivesRestart(MLModelDeploymentFullClusterRestartIT.java:108)


x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/MLModelDeploymentFullClusterRestartIT.java
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */
package org.elasticsearch.xpack.restart;
import com.carrotsearch.randomizedtesting.annotations.Name;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.Version;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.core.Strings;
import org.elasticsearch.upgrades.FullClusterRestartUpgradeStatus;
import org.elasticsearch.xpack.core.ml.inference.assignment.AllocationStatus;
import org.junit.Before;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import static org.elasticsearch.client.WarningsHandler.PERMISSIVE;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
public class MLModelDeploymentFullClusterRestartIT extends AbstractXpackFullClusterRestartTestCase {