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

Better handling of tabs vs spaces in elasticsearch.yml #8259

Closed
ppf2 opened this issue Oct 28, 2014 · 3 comments
Closed

Better handling of tabs vs spaces in elasticsearch.yml #8259

ppf2 opened this issue Oct 28, 2014 · 3 comments

Comments

@ppf2
Copy link
Member

ppf2 commented Oct 28, 2014

Consider the following example, the settings below look fine to the human eye:

image

But if we show the actual hidden characters, the hosts line is actually using a tab instead of spaces to indent the entry:

$
discovery:$
  zen:$
    ping:$
      multicast:$
        enabled: false$
      unicast:$
^Ihosts: ["localhost:9300","localhost:9301"]$
$

As a result, ES silently ignores the hosts entry observed in debug logging:

[2014-10-28 10:49:01,271][DEBUG][discovery.zen.ping.unicast] [Franz Kafka] using initial hosts [], with concurrent_connects [10]

While yaml does not consider tabs valid, it would be nice if there is additional validation implemented in ES to catch this.

@clintongormley clintongormley added the help wanted adoptme label Oct 28, 2014
@johtani
Copy link
Contributor

johtani commented Oct 29, 2014

@clintongormley
Copy link

@johtani thanks for spotting that. that's a bug. you can't assume two spaces for a tab, because the user might be using 4 spaces etc, which messes up their configuration.

Tabs are illegal in YAML and should throw an error.

@wwken
Copy link
Contributor

wwken commented Nov 4, 2014

Yep I agree with @clintongormley . It should throw an exception instead.

wwken added a commit to wwken/elasticsearch that referenced this issue Nov 4, 2014
…ch.yml

 - Throw an exception if there is a 'tab' character in the elasticsearch.yml file
wwken added a commit to wwken/elasticsearch that referenced this issue Nov 5, 2014
wwken added a commit to wwken/elasticsearch that referenced this issue Nov 5, 2014
	- Throw an exception if there is a 'tab' character in the elasticsearch.yml file
wwken added a commit to wwken/elasticsearch that referenced this issue Nov 5, 2014
wwken added a commit to wwken/elasticsearch that referenced this issue Nov 7, 2014
…ch.yml

 - Throw an exception if there is a 'tab' character in the elasticsearch.yml file (reverted from commit 7967f02)
wwken added a commit to wwken/elasticsearch that referenced this issue Nov 7, 2014
jpountz pushed a commit that referenced this issue Nov 14, 2014
Throw an exception if there is a 'tab' character in the elasticsearch.yml file

Close #8259
jpountz pushed a commit that referenced this issue Nov 14, 2014
Throw an exception if there is a 'tab' character in the elasticsearch.yml file

Close #8259
jpountz pushed a commit that referenced this issue Nov 21, 2014
Throw an exception if there is a 'tab' character in the elasticsearch.yml file

Close #8259
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Throw an exception if there is a 'tab' character in the elasticsearch.yml file

Close elastic#8259
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Throw an exception if there is a 'tab' character in the elasticsearch.yml file

Close elastic#8259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants