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

auto_create_index persistent setting not dynamically updateable #27360

Closed
nielsbuyens opened this issue Nov 13, 2017 · 3 comments
Closed

auto_create_index persistent setting not dynamically updateable #27360

nielsbuyens opened this issue Nov 13, 2017 · 3 comments

Comments

@nielsbuyens
Copy link

Elasticsearch version (bin/elasticsearch --version):
version": {
"number": "5.5.2",
"build_hash": "b2f0c09",
"build_date": "2017-08-14T12:33:14.154Z",
"build_snapshot": false,
"lucene_version": "6.6.0"
}
Plugins installed: [x-pack 5.5.2 (monitoring)]

JVM version (java -version):
openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-b16)
OpenJDK 64-Bit Server VM (build 25.141-b16, mixed mode)

OS version (uname -a if on a Unix-like system):
Linux redacted 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
After setting the action.auto_create_index setting to false using the cluster update api, you can not change this setting anymore.
This means that if I set it to false, but later want to change it to for example still allow logstash indices to be created automatically ("+logstash*,-*), I can not do this anymore and get the following error:
persistent setting [action.auto_create_index], not dynamically updateable
The only way I found to make sure I could autocreate logstash indices again was to take the cluster down, remove the global state file from all nodes and restart the cluster.
This is also the case for "destructive_requires_name" and maybe more, but I haven't used any other settings currently.
Is this intended behavior?

Steps to reproduce:

curl -XPUT "http://localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent" : {
"auto_create_index": "false"
}
}'

Should be acknowledged: True

curl -XPUT "http://localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent" : {
"auto_create_index": "+logstash*,-*"
}
}'

Gives error:
persistent setting [action.auto_create_index], not dynamically updateable

@ywelsch
Copy link
Contributor

ywelsch commented Nov 13, 2017

The first update command should have failed already. Are you sure that it succeeded? I cannot reproduce this on a fresh ES 5.5.2 installation.
You can only set action.auto_create_index in your elasticsearch.yml file and need to restart the nodes for the setting to take effect.

@nielsbuyens
Copy link
Author

Yes, I am allowed to run it, the documentation also indicates that it should be possible:

Automatic index creation can be disabled by setting action.auto_create_index to false in the config file of all nodes, or via the cluster update settings API.

@ywelsch
Copy link
Contributor

ywelsch commented Nov 13, 2017

ok, you have to use action.auto_create_index as setting name, not just auto_create_index.

I got confused earlier, because the setting used to be non-dynamic in 2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants