Skip to content

fix(inputs.prometheus): cleanup shared informers on stop.#18304

Open
redbaron wants to merge 1 commit intoinfluxdata:masterfrom
redbaron:inforomer-reload-fix
Open

fix(inputs.prometheus): cleanup shared informers on stop.#18304
redbaron wants to merge 1 commit intoinfluxdata:masterfrom
redbaron:inforomer-reload-fix

Conversation

@redbaron
Copy link
Contributor

@redbaron redbaron commented Feb 4, 2026

Summary

When telegraf configuration is reloaded, Stop() for every plugin is called followed by Start() for all plugins.

Prometheus plugin's Stop() cancels context used to initialize shared informer in the watchPod, which then cause
informer to stop.

Stopped informers cannot be restarted, so we need to remove informers from the global map. This will allow subsequent Start() to initialize fresh informer.

Checklist

Related issues

resolves #18303

When telegraf configuration is reloaded, Stop() for every plugin is
called followed by Start() for all plugins.

Prometheus plugin's Stop() cancels context used to initialize shared
informer in the `watchPod`, which then cause
informer to stop.

Stopped informers cannot be restarted, so we need to
remove informers from the global map. This will allow subsequent Start()
to initialize
fresh informer.
@telegraf-tiger telegraf-tiger bot added area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Feb 4, 2026
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Feb 4, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[inputs.prometheus] kubernetes informer got stuck on reload

1 participant