Skip to content

Ensure elasticsearch logs and data dirs exist before startup #17531

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

Merged

Conversation

donoghuc
Copy link
Member

@donoghuc donoghuc commented Apr 9, 2025

Release notes

[rn:skip]

What does this PR do?

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed

rm -rf /tmp/ls_integration/es-data
rm -rf /tmp/ls_integration/es-logs

Why is it important/What is the impact to the user?

N/A

Checklist

  • My code follows the style guidelines of this project
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files (and/or docker env variables)
  • [ ] I have added tests that prove my fix is effective or that my feature works

Related issues

Copy link

mergify bot commented Apr 9, 2025

This pull request does not have a backport label. Could you fix it @donoghuc? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • backport-8.x is the label to automatically backport to the 8.x branch.
  • If no backport is necessary, please add the backport-skip label

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27
@donoghuc donoghuc force-pushed the test-elasticsearch-setup-improvement branch from bcb8415 to 5230808 Compare April 9, 2025 20:03
@donoghuc donoghuc changed the title WIP: Test assumption in CI Ensure elasticsearch logs and data dirs exist before startup Apr 9, 2025
@donoghuc donoghuc marked this pull request as ready for review April 9, 2025 20:06
@donoghuc donoghuc added the backport-active-all Automated backport with mergify to all the active branches label Apr 9, 2025
Copy link
Contributor

@mashhurs mashhurs left a comment

Choose a reason for hiding this comment

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

LGTM on green CI.

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@mashhurs mashhurs merged commit 8e6e183 into elastic:main Apr 9, 2025
9 checks passed
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

# Conflicts:
#	qa/integration/services/elasticsearch_setup.sh
donoghuc added a commit that referenced this pull request Apr 9, 2025
…#17533)

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Apr 9, 2025
…#17536)

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Apr 9, 2025
…#17537)

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Apr 9, 2025
…#17534)

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Apr 9, 2025
With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)
donoghuc added a commit that referenced this pull request Apr 9, 2025
…#17535)

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

Co-authored-by: Cas Donoghue <[email protected]>
donoghuc added a commit that referenced this pull request Apr 10, 2025
…#17538)

With a recent change in ES elastic/elasticsearch#125449
configuring path.data or path.logs to directories that do not exist cause ES to
not be able to start up. This commit ensures those directories exist. The
teardown script already ensures they are removed https://github.com/elastic/logstash/blob/712b37e1df333e8d156cb5d26fbc24aafcbfd2cd/qa/integration/services/elasticsearch_teardown.sh#L26-L27

(cherry picked from commit 8e6e183)

Co-authored-by: Cas Donoghue <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-active-all Automated backport with mergify to all the active branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants