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.7: Ensure kubernetes caches don't expire if they are being read #11058

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Mar 4, 2019

Cherry-pick of PR #10946 to 6.7 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.7 branch from c3511ae to 7814ace Compare March 4, 2019 12:50
@jsoriano jsoriano merged commit cc57b30 into elastic:6.7 Mar 5, 2019
@jsoriano jsoriano deleted the backport_10946_6.7 branch March 5, 2019 10:09
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