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

Add package test for bad data.path setting from #23981 #24029

Merged
merged 9 commits into from
Apr 17, 2017

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Apr 10, 2017

Adds a packaging test that would have detected #23981.

@nik9000 nik9000 added review >test Issues or PRs that are addressing/adding tests v5.3.0 v5.4.0 v6.0.0-alpha1 labels Apr 10, 2017
@nik9000 nik9000 requested review from dakrone and jasontedor April 10, 2017 20:37
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

Left two comments

# WARNING: This testing file must be executed as root and can
# dramatically change your system. It removes the 'elasticsearch'
# user/group and also many directories. Do not execute this file
# unless you know exactly what you are doing.
Copy link
Member

Choose a reason for hiding this comment

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

Hmm... wonder if we should attempt something like https://stackoverflow.com/questions/28887046/how-to-tell-if-i-am-inside-a-vagrant-host#28909819 inside of our Vagrantfiles?

Then we could abort if someone tried running this outside of Vagrant

Copy link
Member Author

Choose a reason for hiding this comment

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

We certainly could try it.

Copy link
Member Author

Choose a reason for hiding this comment

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

As a followup?

Copy link
Member

Choose a reason for hiding this comment

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

As a followup?

Sure, a followup sounds fine to me

Copy link
Member Author

Choose a reason for hiding this comment

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

I opened an issue so I don't forget. I've left it as adoptme for now because my stack is getting high. #24137

Copy link
Member Author

Choose a reason for hiding this comment

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

But I'll leave it on my list and take it when I can if no one else gets to it first.

}

@test "[BAD data.path] start" {
start_elasticsearch_service green
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 any way we can ensure that starting ES here does use default.path.data?

Copy link
Member Author

Choose a reason for hiding this comment

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

Like, when you don't configure anything? We kind of do that here. Depends on what you mean though.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, if in the future we stop putting -Edefault.path.data=/var/lib/elasticsearch in the startup scripts and instead put path.data: /var/lib/elasticsearch into elasticsearch.yml during installation, this wouldn't exercise the bug

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. I'll see about reproducing this from the tar package as well then.

@nik9000 nik9000 added v5.3.1 :Core/Infra/Settings Settings infrastructure and APIs and removed v5.3.0 labels Apr 11, 2017
@nik9000
Copy link
Member Author

nik9000 commented Apr 11, 2017

@dakrone - I pushed an update that adds a test that explicitly uses default.path.data. I flipped the conditions on the update so they all pass for now. When we've fixed the bug we can flip them again to test that it is fixed.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Nik, I think with Jason's recent changes that fix the bug, you should be able to remove the TODOs and put the proper asserts back

@nik9000
Copy link
Member Author

nik9000 commented Apr 17, 2017

Thanks for reviewing @dakrone! I've flipped the condition and verified locally. I'll merge and cherry-pick soon.

@nik9000 nik9000 merged commit 9653551 into elastic:master Apr 17, 2017
@nik9000 nik9000 added the v5.5.0 label Apr 17, 2017
nik9000 added a commit that referenced this pull request Apr 17, 2017
Adds a packaging test that would have detected #23981. The test configures path.data and validates that nothing ends up in default.path.data.
nik9000 added a commit that referenced this pull request Apr 17, 2017
Adds a packaging test that would have detected #23981. The test configures path.data and validates that nothing ends up in default.path.data.
nik9000 added a commit that referenced this pull request Apr 17, 2017
Adds a packaging test that would have detected #23981. The test configures path.data and validates that nothing ends up in default.path.data.
@nik9000 nik9000 deleted the package_test_no_default_data branch June 7, 2017 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Settings Settings infrastructure and APIs >test Issues or PRs that are addressing/adding tests v5.3.1 v5.4.0 v5.5.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants