elastic/ansible-elasticsearch

Feature: Ability to configure systemd settings from the playbook

oliviercwa opened this issue · 5 comments

The current ansible script does not set the systemd property autorestart to True. One may way to configure this property and others.

It would be great to have a way ton configure the systemd settings from the ansible playbook (either through vars or through a file that gets copied).

jmlrt commented

Hi @oliviercwa,
I don't know about this autorestart systemd property.
Can you provide more details about it and a link to the doc?

Hi jmlrt,
I was not clear. I am referring to the Systemd configuration

restart=always

https://www.freedesktop.org/software/systemd/man/systemd.service.html

By default, it seems that the ansible script does not set this systemd property and the service does not restart automatically.

jmlrt commented

Thanks for the details.
We could eventually add a variable to allow managing it in the `override.conf.j2 template:

[Service]
{% if m_lock_enabled %}
LimitMEMLOCK = infinity
{% endif %}
{% if es_max_open_files is defined %}
LimitNOFILE = {{ es_max_open_files }}
{% endif %}

However this has already been discussed at Elasticsearch level in this post and Elasticsearch team don't recommand it as it's better to be notified of some issue and investigate when a node is stopping than risking data loss by restarting the node automatically without fixing the issue.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had recent activity since being marked as stale.