Skip to content

Commit f86990d

Browse files
[Remote Migration IT] Using voting config exclusion instead of stopping master node (opensearch-project#14433)
Signed-off-by: Shubh Sahu <shubhvs@amazon.com>
1 parent f8213b8 commit f86990d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteMigrationIndexMetadataUpdateIT.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
package org.opensearch.remotemigration;
1010

11+
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
12+
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
1113
import org.opensearch.cluster.ClusterState;
1214
import org.opensearch.cluster.health.ClusterHealthStatus;
1315
import org.opensearch.cluster.metadata.IndexMetadata;
@@ -471,7 +473,6 @@ public void testRemotePathMetadataAddedWithFirstPrimaryMovingToRemote() throws E
471473
* exclude docrep nodes, assert that remote index path file exists
472474
* when shards start relocating to the remote nodes.
473475
*/
474-
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/13939")
475476
public void testRemoteIndexPathFileExistsAfterMigration() throws Exception {
476477
String docrepClusterManager = internalCluster().startClusterManagerOnlyNode();
477478

@@ -518,7 +519,11 @@ public void testRemoteIndexPathFileExistsAfterMigration() throws Exception {
518519
.isAcknowledged()
519520
);
520521

521-
internalCluster().stopRandomNode(InternalTestCluster.nameFilter(docrepClusterManager));
522+
// elect cluster manager with remote-cluster state enabled
523+
internalCluster().client()
524+
.execute(AddVotingConfigExclusionsAction.INSTANCE, new AddVotingConfigExclusionsRequest(docrepClusterManager))
525+
.get();
526+
522527
internalCluster().validateClusterFormed();
523528

524529
logger.info("---> Excluding docrep nodes from allocation");

0 commit comments

Comments
 (0)