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

Cherry-pick #10706 to 7.0: Initialize Paths before loading the keystore #11325

Merged
merged 2 commits into from
Mar 19, 2019

Conversation

graphaelli
Copy link
Member

Cherry-pick of PR #10706 to 7.0 branch. Original message:

The paths were incorrectly initialized meaning that instead of creating
the keystore in the data directory it was created next to the binary.

The problem was the call to paths.InitPaths() was done after loading
the keystore, this was causing a chicken and egg situation and
paths.Resolve(path.Data, "hello") was returning "hello" instead of
data/hello.

To solve that situation we do a partial extract of the configuration,
just enough to initialize the paths and we move on to the keystore and
the complete unpack.

* Initialize Paths before loading the keystore

The paths were incorrectly initialized meaning that instead of creating
the keystore in the data directory it was created next to the binary.

The problem was the call to `paths.InitPaths()` was done after loading
the keystore, this was causing a chicken and egg situation and
`paths.Resolve(path.Data, "hello")` was returning "hello" instead of
`data/hello`.

To solve that situation we do a partial extract of the configuration,
just enough to initialize the paths and we move on to the keystore and
the complete unpack.

(cherry picked from commit 3dbc233)
@graphaelli graphaelli merged commit 4920cd6 into elastic:7.0 Mar 19, 2019
@graphaelli graphaelli deleted the backport_10706_7.0 branch March 19, 2019 23:58
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.

2 participants