Skip to content
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

[7.x] [ILM] Delete min_age field if warm phase on rollover is enabled (#45412) #45524

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
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 @@ -111,7 +111,7 @@ export class EditPolicy extends Component {
if (firstError) {
toastNotifications.addDanger(
i18n.translate('xpack.indexLifecycleMgmt.editPolicy.formErrorsMessage', {
defaultMessage: 'Please fix the errors on this page.'
defaultMessage: 'Please fix the errors on this page.'
})
);
const errorRowId = `${firstError.replace('.', '-')}-row`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ export const phaseToES = (phase, originalEsPhase) => {
esPhase.min_age = `${phase[PHASE_ROLLOVER_MINIMUM_AGE]}${phase[PHASE_ROLLOVER_MINIMUM_AGE_UNITS]}`;
}

// If warm phase on rollover is enabled, delete min age field
// An index lifecycle switches to warm phase when rollover occurs, so you cannot specify a warm phase time
// They are mutually exclusive
if (phase[WARM_PHASE_ON_ROLLOVER]) {
delete esPhase.min_age;
}

esPhase.actions = esPhase.actions || {};

if (phase[PHASE_ROLLOVER_ENABLED]) {
Expand Down