-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add do.Once protection to beater interface #33971
Add do.Once protection to beater interface #33971
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Do need to make this change for x-pack/osquerybeat? That's the only beat I don't see touched or explained already. |
@cmacknz osquerybeat has its own protections built in:
|
Kudos, SonarCloud Quality Gate passed! |
/test |
* add channel protection to beater interface * add changelog (cherry picked from commit 0c77112)
* add channel protection to beater interface * add changelog (cherry picked from commit 0c77112) Co-authored-by: Alex K <[email protected]>
* add channel protection to beater interface * add changelog
What does this PR do?
This is a fix for #32608, which in turn I'm hoping might fix some of the issues with the pidfile fix here: #31670 (comment)
This wraps the beater
Stop()
call used by the beats in aonce.Do()
statement in order to prevent a "close of closed channel" panic. This appears to happening under agent, presumably due to a SIGINT handler callingStop()
at the same time another component is shutting down and also trying to callStop()
. There's no added changes for auditbeat, since it just imports the metricbeat beater interface.I've tested this by prodding elastic-agent with a
restart
command, can't get the panic again.Why is it important?
We don't want beats to randomly panic.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.