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

fix(agent): Allow gracefull shutdown on interrupt (e.g. Ctrl-C) #12781

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Mar 2, 2023

In v1.25.0 we introduced secret-stores (PR #11232) and with this added a call to memguard.CatchInterrupt() however, this created a race-condition with the usual signal handling in telegraf where almost always memguard was successful in calling os.Exit before the agent finished shutting down the plugins etc.

This PR removes the call to memguard.CatchInterrupt(). This is safe as we handle interrupts already and use the defer memguard.Purge() statement to safely erase all secrets.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Mar 2, 2023
@srebhan srebhan added regression something that used to work, but is now broken area/agent labels Mar 2, 2023
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Mar 2, 2023

@powersj powersj merged commit ed91ca2 into influxdata:master Mar 2, 2023
@srebhan srebhan added this to the v1.26.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent fix pr to fix corresponding bug regression something that used to work, but is now broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants