diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/validation/SourceDestValidator.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/validation/SourceDestValidator.java index 9adb668265151..49bdf60ad0b18 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/validation/SourceDestValidator.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/validation/SourceDestValidator.java @@ -70,9 +70,12 @@ public final class SourceDestValidator { public static final String REMOTE_CLUSTER_LICENSE_INACTIVE = "License check failed for remote cluster " + "alias [{0}], license is not active"; public static final String REMOTE_SOURCE_INDICES_NOT_SUPPORTED = "remote source indices are not supported"; - public static final String REMOTE_CLUSTERS_TOO_OLD = + public static final String REMOTE_CLUSTERS_TRANSPORT_TOO_OLD = "remote clusters are expected to run at least transport version [{0}] (reason: [{1}])," + " but the following clusters were too old: [{2}]"; + public static final String REMOTE_CLUSTERS_CONFIG_TOO_OLD = + "remote clusters are expected to run at least config version [{0}] (reason: [{1}])," + + " but the following clusters were too old: [{2}]"; public static final String PIPELINE_MISSING = "Pipeline with id [{0}] could not be found"; private final IndexNameExpressionResolver indexNameExpressionResolver; @@ -490,7 +493,7 @@ public void validate(Context context, ActionListener listener) { .collect(toMap(Map.Entry::getKey, Map.Entry::getValue)); if (oldRemoteClusterVersions.isEmpty() == false) { context.addValidationError( - REMOTE_CLUSTERS_TOO_OLD, + REMOTE_CLUSTERS_TRANSPORT_TOO_OLD, minExpectedVersion, reason, oldRemoteClusterVersions.entrySet() diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java index 4028054368907..66ad07e76bca1 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedAction.java @@ -79,7 +79,7 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -import static org.elasticsearch.xpack.core.common.validation.SourceDestValidator.REMOTE_CLUSTERS_TOO_OLD; +import static org.elasticsearch.xpack.core.common.validation.SourceDestValidator.REMOTE_CLUSTERS_CONFIG_TOO_OLD; /* This class extends from TransportMasterNodeAction for cluster state observing purposes. The stop datafeed api also redirect the elected master node. @@ -316,7 +316,7 @@ static void checkRemoteConfigVersions( throw ExceptionsHelper.badRequestException( Messages.getMessage( - REMOTE_CLUSTERS_TOO_OLD, + REMOTE_CLUSTERS_CONFIG_TOO_OLD, minVersion.toString(), reason, Strings.collectionToCommaDelimitedString(clustersTooOld) diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedActionTests.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedActionTests.java index 1d1d99d028f97..4a66a2836273e 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedActionTests.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/action/TransportStartDatafeedActionTests.java @@ -137,7 +137,7 @@ public void testRemoteClusterVersionCheck() { assertThat( ex.getMessage(), containsString( - "remote clusters are expected to run at least version [7.11.0] (reason: [runtime_mappings]), " + "remote clusters are expected to run at least config version [7.11.0] (reason: [runtime_mappings]), " + "but the following clusters were too old: [old_cluster_1]" ) );