-
Notifications
You must be signed in to change notification settings - Fork 25.2k
yaml parser for elasticsearch.yml wrongly parsing lists #51880
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
Comments
Can you please elaborate what you mean exactly when you say "not parsed properly" and "won't work"? Please include a clear reproduction scenario and your expected and the actual result. Here's what I've tried meanwhile: I started a single Elasticsearch node (version 7.5.2, OSS distribution) with the following node.name: node-1
network.host: 0.0.0.0
cluster.initial_master_nodes:
- node-1
- node-2 After starting the node, I observed in the logs:
note the output: Then I started the node again with the following node.name: node-1
network.host: 0.0.0.0
cluster.initial_master_nodes:
- node-1
- node-2 The behavior that I have observed is identical.
Can you please raise this as a separate issue in https://github.com/elastic/ansible-elasticsearch/? According to the Ansible team,
|
Pinging @elastic/es-core-infra (:Core/Infra/Settings) |
I start a completely new cluster of 3 systems, adding the list of master nodes as you did (but 3 nodes) the cluster won't be initialised because there is no master eligible node. This is my config with slightly altered hostnames:
|
No, the default value of I tried the config you quoted and see the expected message in the logs that mentions all three nodes:
I am closing this as as far as I can tell this is working as expected. If you can provide a way of reproducing what you're seeing then we can reopen this. |
Elasticsearch version (
bin/elasticsearch --version
):7.5.2 (recent form official repo)
Plugins installed: []
JVM version (
java -version
):openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~16.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
OS version (
uname -a
if on a Unix-like system):Linux elk0 4.15.0-1067-azure #72-Ubuntu SMP Wed Jan 15 15:07:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Defining a list with unquoted children on the same level as the parent are not parsed properly
Example:
Works:
Also works:
Also works:
But
won't work:
According to my understanding, the last list is also a valid yaml syntax.
PyYaml used by Ansible e.g. in the filter "to_nice_yaml" produces exactly the last array.
Fun fact: elasticsearch's official role "ansible-elasticsearch" uses this filter to build the elasticsearch.yaml.
As a workaround for ansible users: you can use "to_yaml" in the template instead, which produces a working onliner.
Steps to reproduce:
Write a config in the described list format.
Provide logs (if relevant):
Logs are not relevant.
The text was updated successfully, but these errors were encountered: