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

[BUG] path.data does not support lists #69

Open
darkpixel opened this issue Nov 6, 2019 · 1 comment
Open

[BUG] path.data does not support lists #69

darkpixel opened this issue Nov 6, 2019 · 1 comment
Labels

Comments

@darkpixel
Copy link

Elasticsearch docs support multiple data paths.

The path.data settings can be set to multiple paths, in which case all paths will be used to store data (although the files belonging to a single shard will all be stored on the same data path):

path:
  data:
    - /mnt/elasticsearch_1
    - /mnt/elasticsearch_2
    - /mnt/elasticsearch_3

See: https://www.elastic.co/guide/en/elasticsearch/reference/master/path-settings.html

Attempting to use a list produces the following output:

[CRITICAL] Rendering SLS 'base:elasticsearch.config' failed: while constructing a mapping
  in "<unicode string>", line 1, column 1:
    include:
    ^
found unacceptable key [ScalarNode(tag='tag:yaml.org,2002:str', value='/usr/shar
  in "<unicode string>", line 17, column 1:
    ['/usr/share/elasticsearch/data' ... 
    ^
local:
    Data failed to compile:
----------
    Rendering SLS 'base:elasticsearch.config' failed: while constructing a mappi
  in "<unicode string>", line 1, column 1:
    include:
    ^
found unacceptable key [ScalarNode(tag='tag:yaml.org,2002:str', value='/usr/shar
  in "<unicode string>", line 17, column 1:
    ['/usr/share/elasticsearch/data' ... 
    ^
@darkpixel darkpixel added the bug label Nov 6, 2019
@myii
Copy link
Member

myii commented Nov 6, 2019

Thanks for the report @darkpixel.

Relevant parts of the formula to be adjusted:

path.data: /srv/data
path.logs: /srv/logs

  • Need to show an example of path.data provided as a list as well.

{% set data_dir = salt['pillar.get']('elasticsearch:config:path.data') %}
{% set log_dir = salt['pillar.get']('elasticsearch:config:path.logs') %}
{% for dir in (data_dir, log_dir) %}
{% if dir %}

  • Merge everything together into a single list to iterate over.

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

No branches or pull requests

2 participants