Skip to content
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

Add better handling for Kubernetes Update and Delete watcher events #18882

Merged
merged 13 commits into from
Jun 17, 2020

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Jun 1, 2020

Improvements for #11834 described on #11834 (comment)

Changes:

  1. Retry on configCheck failures in order to cover stop/start events.
  2. Ignore Update events when status of Pod is Pending.
  3. Emit delete anywayeven if the obj cannot be found in thestore` at
    o, exists, err := w.store.GetByKey(key)
    , so as to ensure that states are cleaned anyway.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 1, 2020
@ChrsMark ChrsMark self-assigned this Jun 1, 2020
@ChrsMark ChrsMark added the Team:Platforms Label for the Integrations - Platforms team label Jun 1, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 1, 2020
Signed-off-by: chrismark <[email protected]>
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 1, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #18882 updated]

  • Start Time: 2020-06-16T11:23:29.636+0000

  • Duration: 86 min 41 sec

Test stats 🧪

Test Results
Failed 0
Passed 9441
Skipped 1574
Total 11015

@ChrsMark
Copy link
Member Author

Reverted checks for input realted errors handling (see content 078c279).

@exekias @jsoriano what do you think about adding these changes for now since we have found them, regardless of what we do for input related issues(maybe we need to wait for inputs' refactoring in order to completely resolve 11834).

@ChrsMark ChrsMark marked this pull request as ready for review June 15, 2020 07:46
@ChrsMark ChrsMark changed the title Fix race conditions and config errors Add better handling for Kubernetes Update and Delete watcher events Jun 15, 2020
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Agree on adding these changes now that we can see that they can improve the situation. Added a couple of small suggestions.

libbeat/common/kubernetes/watcher.go Outdated Show resolved Hide resolved
libbeat/autodiscover/providers/kubernetes/pod.go Outdated Show resolved Hide resolved
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
@ChrsMark
Copy link
Member Author

Thanks for the suggestions @jsoriano!, PR updated.

@ChrsMark ChrsMark merged commit d573e8c into elastic:master Jun 17, 2020
ChrsMark added a commit to ChrsMark/beats that referenced this pull request Jun 17, 2020
ChrsMark added a commit that referenced this pull request Jun 17, 2020
ChrsMark added a commit to ChrsMark/beats that referenced this pull request Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autodiscovery Team:Platforms Label for the Integrations - Platforms team v7.8.2 v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants