Skip to content

Ignore ILM indices in the TerminalPolicyStep #55184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,15 @@ void runPeriodicStep(String policy, IndexMetadata indexMetadata) {
markPolicyDoesNotExist(policy, indexMetadata.getIndex(), lifecycleState);
return;
} else {
Step.StepKey currentStepKey = LifecycleExecutionState.getCurrentStepKey(lifecycleState);
if (TerminalPolicyStep.KEY.equals(currentStepKey)) {
// This index is a leftover from before we halted execution on the final phase
// instead of going to the completed phase, so it's okay to ignore this index
// for now
return;
}
logger.error("current step [{}] for index [{}] with policy [{}] is not recognized",
LifecycleExecutionState.getCurrentStepKey(lifecycleState), index, policy);
currentStepKey, index, policy);
return;
}
}
Expand Down Expand Up @@ -263,8 +270,15 @@ void maybeRunAsyncAction(ClusterState currentState, IndexMetadata indexMetadata,
return;
}
if (currentStep == null) {
Step.StepKey currentStepKey = LifecycleExecutionState.getCurrentStepKey(lifecycleState);
if (TerminalPolicyStep.KEY.equals(currentStepKey)) {
// This index is a leftover from before we halted execution on the final phase
// instead of going to the completed phase, so it's okay to ignore this index
// for now
return;
}
logger.warn("current step [{}] for index [{}] with policy [{}] is not recognized",
LifecycleExecutionState.getCurrentStepKey(lifecycleState), index, policy);
currentStepKey, index, policy);
return;
}

Expand Down Expand Up @@ -323,8 +337,15 @@ void runPolicyAfterStateChange(String policy, IndexMetadata indexMetadata) {
markPolicyDoesNotExist(policy, indexMetadata.getIndex(), lifecycleState);
return;
} else {
Step.StepKey currentStepKey = LifecycleExecutionState.getCurrentStepKey(lifecycleState);
if (TerminalPolicyStep.KEY.equals(currentStepKey)) {
// This index is a leftover from before we halted execution on the final phase
// instead of going to the completed phase, so it's okay to ignore this index
// for now
return;
}
logger.error("current step [{}] for index [{}] with policy [{}] is not recognized",
LifecycleExecutionState.getCurrentStepKey(lifecycleState), index, policy);
currentStepKey, index, policy);
return;
}
}
Expand Down