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

Validate that Elasticsearch home/data paths are readable #2538

Merged
merged 1 commit into from Jul 26, 2016

Conversation

joschi
Copy link
Contributor

@joschi joschi commented Jul 26, 2016

These validations will ensure that cases like #2536 result in a better error message.

throw new ValidationException("Path " + path.toAbsolutePath() + " is not a directory.");
}

if (Files.exists(path) && !Files.isReadable(path)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a case where the directory also needs to be writable? If so, we should also test for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be writable if data is being stored (elasticsearch_node_data). Other than that, I haven't found a case for which it had to be writable.

Funny enough, the directories don't even have to exist, it's sufficient if the parent directory is there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 👎 was wrong 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bernd
Copy link
Member

bernd commented Jul 26, 2016

LGTM 👍

@bernd bernd merged commit 958a335 into master Jul 26, 2016
@bernd bernd deleted the validate-elasticsearch-paths branch July 26, 2016 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants