Skip to content

Commit 966b363

Browse files
authored
ILM don't fail the mount step on ACCEPTED response (#54580)
The mount api will accept the request and go ahead and create the index. This makes the MountSnapshotStep complete in case ACCEPTED is the response status as the next step will wait for the index to be created and reach the GREEN state.
1 parent c6e3185 commit 966b363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void performDuringNoSnapshot(IndexMetaData indexMetaData, ClusterState currentCl
9292
false);
9393
getClient().execute(MountSearchableSnapshotAction.INSTANCE, mountSearchableSnapshotRequest,
9494
ActionListener.wrap(response -> {
95-
if (response.status() != RestStatus.OK) {
95+
if (response.status() != RestStatus.OK || response.status() != RestStatus.ACCEPTED) {
9696
logger.debug("mount snapshot response failed to complete");
9797
throw new ElasticsearchException("mount snapshot response failed to complete, got response " + response.status());
9898
}

0 commit comments

Comments
 (0)