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

Cherry-pick #10946 to 6.5: Ensure kubernetes caches don't expire if they are being read #11060

Merged
merged 2 commits into from
Mar 14, 2019

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Mar 4, 2019

Cherry-pick of PR #10946 to 6.5 branch. Original message:

Some metrics in metricbeat kubernetes module are cached during a time,
if they are not updated they are removed. But it is usual to have pods or
containers that are not updated during more time that the expiration cache.
Current implementation was not renovating expiration times for cache
entries so all were eventually removed if updates for them are not received.
Replace it with the cache implementation available in libbeat, but keeping
the existing interface.

Also, use slashes instead of dashes to generate unique container uids.
Dashes can be used by kubernetes names, what could lead to ambiguous
keys for the caches.

Fix #10658

…#10946)

Some metrics in metricbeat kubernetes module are cached during a time,
if they are not updated they are removed. But it is usual to have pods or
containers that are not updated during more time that the expiration cache.
Current implementation was not renovating expiration times for cache
entries so all were eventually removed if updates for them are not received.
Replace it with the cache implementation available in libbeat, but keeping
the existing interface.

Also, use slashes instead of dashes to generate unique container uids.
Dashes can be used by kubernetes names, what could lead to ambiguous
keys for the caches.

Fix elastic#10658

(cherry picked from commit 106df3d)
@jsoriano jsoriano force-pushed the backport_10946_6.5 branch from 8a62b25 to 867336e Compare March 4, 2019 12:53
@sayden
Copy link
Contributor

sayden commented Mar 4, 2019

jenkins, test this please

@sayden
Copy link
Contributor

sayden commented Mar 5, 2019

@jsoriano it seems that there's some misconfiguration in Travis / Jenkins in this branch and that's why the tests are not being launched in CI

@jsoriano
Copy link
Member Author

jsoriano commented Mar 5, 2019

Issue in jenkins is not related, the misconfiguration in travis is #11081

@sayden
Copy link
Contributor

sayden commented Mar 5, 2019

So I guess it's better to wait until it's merged and then rebase.

@jsoriano
Copy link
Member Author

jsoriano commented Mar 5, 2019

@sayden yes, let's wait, no hurries for this.

@jsoriano jsoriano merged commit 3dba655 into elastic:6.5 Mar 14, 2019
@jsoriano jsoriano deleted the backport_10946_6.5 branch March 14, 2019 11:16
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…#10946) (elastic#11060)

Some metrics in metricbeat kubernetes module are cached during a time,
if they are not updated they are removed. But it is usual to have pods or
containers that are not updated during more time that the expiration cache.
Current implementation was not renovating expiration times for cache
entries so all were eventually removed if updates for them are not received.
Replace it with the cache implementation available in libbeat, but keeping
the existing interface.

Also, use slashes instead of dashes to generate unique container uids.
Dashes can be used by kubernetes names, what could lead to ambiguous
keys for the caches.

Fix elastic#10658

(cherry picked from commit db4b4c2)
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.

3 participants