Ensure logs dir exists before using as working dir#126566
Merged
rjernst merged 6 commits intoelastic:mainfrom Apr 17, 2025
Merged
Ensure logs dir exists before using as working dir#126566rjernst merged 6 commits intoelastic:mainfrom
rjernst merged 6 commits intoelastic:mainfrom
Conversation
With the change to using the logs dir as the working dir of the Elasticsearch process we need to ensure the logs dir exists within the CLI instead of later during startup. relates elastic#124966
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
andsel
added a commit
to andsel/logstash
that referenced
this pull request
Apr 11, 2025
ldematte
approved these changes
Apr 14, 2025
Contributor
ldematte
left a comment
There was a problem hiding this comment.
Optionally I'd add some tests for various situations (no dir, existing dir, existing dir with wrong access), but LGTM
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
rjernst
added a commit
to rjernst/elasticsearch
that referenced
this pull request
Jul 2, 2025
With the change to using the logs dir as the working dir of the Elasticsearch process we need to ensure the logs dir exists within the CLI instead of later during startup. relates elastic#124966
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 20, 2025
* Use logs dir as working directory (#124966) In the unexpected case that Elasticsearch dies due to a segfault or other similar native issue, a core dump is useful in diagnosing the problem. Yet core dumps are written to the working directory, which is read-only for most installations of Elasticsearch. This commit changes the working directory to the logs dir which should always be writeable. * Ensure logs dir exists before using as working dir (#126566) With the change to using the logs dir as the working dir of the Elasticsearch process we need to ensure the logs dir exists within the CLI instead of later during startup. relates #124966 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
Hi @rjernst could we get this backported to v8.19? |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the change to using the logs dir as the working dir of the Elasticsearch process we need to ensure the logs dir exists within the CLI instead of later during startup.
relates #124966