Skip to content

Remove LogWatch initialization during k8s task shutdown#18579

Closed
capistrant wants to merge 2 commits intoapache:masterfrom
capistrant:k8s-task-no-logwatchinit-on-shutdown
Closed

Remove LogWatch initialization during k8s task shutdown#18579
capistrant wants to merge 2 commits intoapache:masterfrom
capistrant:k8s-task-no-logwatchinit-on-shutdown

Conversation

@capistrant
Copy link
Copy Markdown
Contributor

Description

Remove unnecessary LogWatch initialization from shutdown() in the K8s work item class. Under normal operations, the peon will already have initialized its LogWatch needed to stream logs. During shutdown it should either not need to create one because it exists, or skip creating it as we are just wanting to push through a shutdown at this point.

#18444 was created to try and mitigate known issues with LogWatch. This added a hacky timeout when trying to persist logs. Instead of doing that song and dance here, I propose we just drop the call to initialize it as the benefit of doing it is not clear to me. Removing it reduces risk of issues in shutdown leading to threads hung in fabric8 code like has been seen in live prod clusters.

Release note


Key changed/added classes in this PR
  • MyFoo
  • OurBar
  • TheirBaz

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@kfaraz
Copy link
Copy Markdown
Contributor

kfaraz commented Sep 26, 2025

Thanks for the PR, @capistrant !
I was in the middle of writing up a test to verify this 🙂
Putting it up in #18580 .

@capistrant
Copy link
Copy Markdown
Contributor Author

Thanks for the PR, @capistrant ! I was in the middle of writing up a test to verify this 🙂 Putting it up in #18580 .

Maybe we should consolidate the removal into your PR? Might make it easier for someone investigating the change at a later date to only end up at 1 PR with the change and the test for it

@kfaraz
Copy link
Copy Markdown
Contributor

kfaraz commented Sep 26, 2025

Sure, @capistrant , I will update the test PR to include the fix.

@capistrant capistrant closed this Sep 27, 2025
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