[ILM] Delete min_age field if warm phase on rollover is enabled (#45412)
This commit is contained in:
parent
e92857090b
commit
43c033d942
|
@ -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`;
|
||||
|
|
|
@ -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]) {
|
||||
|
|
Loading…
Reference in a new issue