Remove deprecated setting via API

I've upgrade to elasticsearch 6.1.1. When trying to update cluster settings it can't because it still has retired settings.

Running curl 'localhost/_cluster/settings?pretty' returns the following response which still has settings related to store throttling which are no longer in use since version 6.0 (see https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_settings_changes.html#_store_throttling_settings)

{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : "100mb"
        }
      }
    }
  },
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "exclude" : {
            "_ip" : ""
          }
        }
      }
    },
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : "merge"
        }
      }
    }
  }
}

I've tried removing them in the following ways, but none of them successful:

curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : ""
        }
      }
    }
  },
  "transient" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : ""
        }
      }
    }
  }
}'

and

curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : null
        }
      }
    }
  },
  "transient" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : null
        }
      }
    }
  }
}'

and

curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {
    "indices" : {
      "store" : {
      }
    }
  },
  "transient" : {
    "indices" : {
      "store" : {
      }
    }
  }
}'

So what's the proper way of deleting unknown settings?

I've seen multiple similar topics, but none of them has the answer. It would be good if during upgrades or setting merges obsolete settings got removed automatically.

When trying to reset settings with

curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {},
    "transient" : {}
}'

I get the following error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "action_request_validation_exception",
        "reason" : "Validation Failed: 1: no settings to update;"
      }
    ],
    "type" : "action_request_validation_exception",
    "reason" : "Validation Failed: 1: no settings to update;"
  },
  "status" : 400
}

When adding an existing setting to update it returns with the error about unknown settings. Is there a way to overwrite instead of merge settings?

What at first sight seems to work is running

curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?flat_settings=true" -d '
{
  "persistent" : {
    "indices.store.throttle.*" : null  
  },
  "transient" : {
    "indices.store.throttle.*" : null
  }
}'

which returns

{"acknowledged":true,"persistent":{},"transient":{}}

but when running

curl 'localhost/_cluster/settings?pretty'

it still returns

{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : "100mb"
        }
      }
    }
  },
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "exclude" : {
            "_ip" : ""
          }
        }
      }
    },
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : "merge"
        }
      }
    }
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.