-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Make data directories work with symlinks again #85878
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Hi @grcevski, I've created a changelog YAML for you. |
I added the backport levels because I assume we want to restore the symlink functionality all the way to 8.0. |
server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
Show resolved
Hide resolved
@@ -597,6 +597,18 @@ public void testIndexCompatibilityChecks() throws IOException { | |||
} | |||
} | |||
|
|||
public void testSymlinkDataDirectory() throws Exception { | |||
Path tempDir = createTempDir().toAbsolutePath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this test is going to be enough, since the test environment is not exactly like production. I suggest a packaging test in qa/os. There should be some other symlink related tests there I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll add a test there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -701,4 +701,17 @@ public static void verifySecurityNotAutoConfigured(Installation es) throws Excep | |||
} | |||
} | |||
|
|||
public void updateConfig(Path confPath, String key, String replacement) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some methods in ServerUtils for adding/removing settings. Perhaps this should go there? Or those existing methods could be used instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! I'll take a look to see if I can reuse something in there.
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/part-2 |
@elasticmachine update branch |
💔 Backport failed
You can use sqren/backport to manually backport by running |
As per #85701, Elasticsearch fails to start if the configured data directory is a symlink. This PR fixes the call to createDirectories to support following through symlinks.
Closes #85701