From c104c9a11bd9edf054e868e8ce834bb9fbda1c0b Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 12 May 2020 18:07:58 +0200 Subject: [PATCH] Fix Missing IgnoredUnavailable Flag in 7.x SLM Retention Task (#56616) Without the flag we run into the situation where a broken repository (broken by some old 6.x version of ES that is missing some snap-${uuid}.dat blobs fails to run the SLM retention task since it always errors out). --- .../java/org/elasticsearch/xpack/slm/SnapshotRetentionTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/slm/SnapshotRetentionTask.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/slm/SnapshotRetentionTask.java index 52fba7eaf6a..283e121cb53 100644 --- a/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/slm/SnapshotRetentionTask.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/slm/SnapshotRetentionTask.java @@ -270,6 +270,7 @@ public class SnapshotRetentionTask implements SchedulerEngine.Listener { for (String repository : repositories) { client.admin().cluster() .prepareGetSnapshots(repository) + .setIgnoreUnavailable(true) .execute(ActionListener.wrap(resp -> { final Set retainableStates = new HashSet<>(Arrays.asList(SnapshotState.SUCCESS, SnapshotState.FAILED, SnapshotState.PARTIAL));