-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix terminating pod autodiscover issue #20084
Conversation
Signed-off-by: chrismark <[email protected]>
Pinging @elastic/integrations-platforms (Team:Platforms) |
This pull request doesn't have a |
Signed-off-by: chrismark <[email protected]>
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
--------------------- >> end captured stdout << ---------------------- Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
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 think we should wait for the containers to be actually stopped before triggering a stop event. See my comment about this.
It would be also nice to have some tests to cover cases with termination grace periods, but this could go in a future change, this may be tricky to do.
Signed-off-by: chrismark <[email protected]>
Tested again after f62ca1e and issue is solved without the need of adding |
(cherry picked from commit b561047)
(cherry picked from commit b561047)
…ne-2.0 * upstream/master: (41 commits) adding possibility to override content-type checks, it was breaking certain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232) fix: use a fixed worker type for tests (elastic#20130) [Ingest Manager] Prepare packaging for endpoint and asc files (elastic#20186) [Packetbeat] HTTP: Improve support for 100-continue elastic#15830 (elastic#19349) Increase index.max_docvalue_fields_search to 200 (elastic#20218) [Ingest Manager] Prevent closing closed reader (elastic#20214) [Metricbeat] Use MySQL Host Parser in Query metricset (elastic#20191) Testing: Ignore timestamp from cylance/protect dataset (elastic#20211) [Filebeat] Ignore cylance.protect timestamps while testing (elastic#20207) [CI] remove codecov step (elastic#20102) [docs] Indicate that SYSTEM user is required on Windows to use Endpoint (elastic#20172) Remove f5/firepass rsa2elk fileset (elastic#20160) [Elastic Agent] Improve GRPC stop to be more relaxed. (elastic#20118) Fix fileset field prefixing (elastic#20170) Fix terminating pod autodiscover issue (elastic#20084) Call host parser only once when building light metricsets (elastic#20149) [CI] fix null string with contains (elastic#20182) [Ingest Manager] Fix failing unit tests on windows (elastic#20127) [Filebeat] Update crowdstrike module (elastic#20138) [docs] Add x-pack role to relevant metricsets (elastic#20167) ...
7.9.0 have released, https://www.elastic.co/guide/en/beats/libbeat/7.9/release-notes-7.9.0.html。 |
@z521598 Looks like it is in the release notes:
|
What does this PR do?
This addition handles the case when a Pod is in
Terminating
phase.In this case the pod is neither
PodSucceeded
norPodFailed
andhence requires special handling.
In this, we check all Pod's containers' statuses and if we find a at least
one still running we ignore this update event. With this, we make sure
that all containers are stopped before stopping Filebeat.
Why is it important?
To collect any leftover logs when the pod is going in Terminating state.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Use replication steps of #17396 (comment) and expect to see that the issue is fixed. The screenshot below provides the fixed case.
Related issues
Screenshots