Skip to content

[8.0 Upgrade Assistant] Reindex failed when the index was ever frozen  #40564

@hubbleview

Description

@hubbleview

Kibana version: 7.2.0

Elasticsearch version: 7.2.0

Describe the bug:
When Elasticsearch and Kibana at 6.x, some indices were ever frozen/unfrozen, so the index settings is added following private settings:

    "settings" : {
      "index" : {
        "search" : {
          "throttled" : "false"
        },
        "frozen" : "false",

After upgrading Elasticsearch and Kibana from 6.x to 7.2, running 8.0 Upgrade Assistant, it prompts to convert the index created before 7.0 should be reindexed. However, the step creating new index failed with following error:

Creating new index
There was an error

[index_creation_exception] failed to create index [reindexed-v7-kibana_sample_data_logs] :: {"path":"/reindexed-v7-kibana_sample_data_logs","query":{},"body":"{\"settings\":{\"index.auto_expand_replicas\":\"0-1\",\"index.frozen\":\"false\",\"index.number_of_replicas\":\"0\",\"index.number_of_shards\":\"1\",\"index.search.throttled\":\"false\"},\"mappings\":{...}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"index_creation_exception\",\"reason\":\"failed to create index [reindexed-v7-kibana_sample_data_logs]\"}],\"type\":\"validation_exception\",\"reason\":\"Validation Failed: 1: private index setting [index.frozen] can not be set explicitly;2: private index setting [index.search.throttled] can not be set explicitly;\"},\"status\":400}"}

Looks like, when creating index, the index private settings are also used, which is not allowed.

Steps to reproduce:

  1. Freeze the Kibana sample index in 6.x (I was using 6.8.1). Observing the index settings was added following:
    "settings" : {
      "index" : {
        "search" : {
          "throttled" : "false"
        },
        "frozen" : "false",

After that, even unfreeze, the settings are still there.
2. Upgrade ES/Kibana from 6.x to 7.2.0.
3. Run Kibana > 8.0 Upgrade Assistant > Indices > click Reindex for Index created before 7.0, then it would fail with errors.

Creating new index
There was an error

[index_creation_exception] failed to create index [reindexed-v7-kibana_sample_data_logs] :: {"path":"/reindexed-v7-kibana_sample_data_logs","query":{},"body":"{\"settings\":{\"index.auto_expand_replicas\":\"0-1\",\"index.frozen\":\"false\",\"index.number_of_replicas\":\"0\",\"index.number_of_shards\":\"1\",\"index.search.throttled\":\"false\"},\"mappings\":{...}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"index_creation_exception\",\"reason\":\"failed to create index [reindexed-v7-kibana_sample_data_logs]\"}],\"type\":\"validation_exception\",\"reason\":\"Validation Failed: 1: private index setting [index.frozen] can not be set explicitly;2: private index setting [index.search.throttled] can not be set explicitly;\"},\"status\":400}"}

Expected behavior:
Private settings of index should be excluded when creating new index with format 7.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:Upgrade AssistantTeam:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//bugFixes for quality problems that affect the customer experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions