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

Promtail: Remove non-ready filemanager targets #3587

Merged

Conversation

rsteneteg
Copy link
Contributor

Remove targets that dont have any tails, in order for the target to be removed and recreated during next sync

Signed-off-by: Roger Steneteg rsteneteg@ea.com

What this PR does / why we need it:
This PR fixes a bug that causes Promtail to stop tailing statefulset pods after they are deleted/rescheduled

Which issue(s) this PR fixes:
Fixes #3586

Special notes for your reviewer:
The bug seems to be some race condition where the pod is deleted and recreated before the filetarget has been removed, this fix removes any filetarget that no longer has any tails, allowing them to be recreated which solves the problem, but it does not address the actual race condition.

Checklist

  • Documentation added
  • Tests updated

@rsteneteg rsteneteg force-pushed the rsteneteg/remove-non-ready-targets branch from 002317a to 84fa896 Compare April 7, 2021 18:45
@CLAassistant
Copy link

CLAassistant commented Apr 20, 2021

CLA assistant check
All committers have signed the CLA.

…e removed and recreated during next sync

Signed-off-by: Roger Steneteg <rsteneteg@ea.com>
@rsteneteg rsteneteg force-pushed the rsteneteg/remove-non-ready-targets branch from 9623cc9 to 8ad265d Compare April 27, 2021 18:39
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit 735e8dc into grafana:main May 5, 2021
@rsteneteg rsteneteg deleted the rsteneteg/remove-non-ready-targets branch May 5, 2021 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promtail stops tailing statefulset pod on kubernetes after pod is deleted and rescheduled
3 participants