Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Validate configuration #64

Closed
babadofar opened this issue Feb 3, 2016 · 12 comments
Closed

Validate configuration #64

babadofar opened this issue Feb 3, 2016 · 12 comments

Comments

@babadofar
Copy link

Using a map for configuring elasticsearch.yml is super flexible and nice, but it makes it very easy to miscreate configurations that will not start. It would be very nice if there was some sort of validation that checks syntax.

@gingerwizard
Copy link

@babadofar whilst i like the idea of this feature, any validation will require us knowledge of the settings. This will somewhat negate the purpose of the map.

However, if it is just syntax checks you are after that maybe possible?
We might be able to convert it to configuration and ask the ES binary if its valid, stopping earlier if not. Would this satisfy your requirement?

@babadofar
Copy link
Author

When using the template function of ansible, there is an option to make it validate the file that results from running the template using a command that you can specify. I have used this previously to validate Logstash configurations, using the Logstash --configtest parameter. I'm not sure whether there is such a parameter to elasticsearch. So perhaps this issue is better moved there?

@gingerwizard
Copy link

@babadofar yes this is indeed possible in ES. I'll investigate and see if we can do this with ES.

@gingerwizard
Copy link

@babadofar So configuration validation is coming in ES 5.0. I will raise a ticket asking for a -t flag and reference

@gingerwizard
Copy link

Discussing with ES dev the best way to do this will be to start a standalone node with the configuration. I'm looking at ways to achieve this prior to running the playbook as a pre-check.

@strootman
Copy link
Contributor

Docker may be a nice solution for this.

$ docker run -v [mount generated config file to correct location] elasticsearch:5.0 elasticsearch -t ...

Assuming that running elasticsearch with the -t option returns with correct exit codes.

@gingerwizard
Copy link

@strootman i was thinking we would need to download the version the user is using - as config is subject to change. Effectively local-action commands. This way we can warn if settings are deprecated etc.

This is likely to be a completely separate task with an optional switch. Happy for someone to take this on as i'll be focusing on 5.0 support after the xpack pull request.

@botelastic
Copy link

botelastic bot commented Sep 18, 2019

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.

@botelastic
Copy link

botelastic bot commented Oct 18, 2019

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

@botelastic botelastic bot closed this as completed Oct 18, 2019
@ktham
Copy link

ktham commented Nov 18, 2019

@gingerwizard Was Configuration validation ever released?

@xrkolovos
Copy link

Any news on this one?

@jruariveiro
Copy link

Any news under the sun?

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

No branches or pull requests

6 participants