jguay/ElasticMisc

migrateIndicesToTierPreference.sh for indices already in ILM error will bring the wrong tier preference value

Closed this issue · 0 comments

jguay commented

Assume an index is already in warm step in ILM with these settings :

"routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_warm,data_hot"
            },
            "require" : {
              "data" : "hot"
            }
          }
        }

In this case running the script will result in :

"routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_hot"
            },
            "require" : {
              "data" : null
            }
          }
        }

Instead, what should happen is if both tier preference and require are defined, only the tier preference remains