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

Wait for the beat to exit during shutdown of beats receivers #42652

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

swiatekm
Copy link
Contributor

Proposed commit message

Wait for the beat to exit during shutdown of beats receivers.

According to the otel component interface, Shutdown should wait for global resources to be freed. In particular, Shutdown returning means that the collector may create and start another component with the same name, which in case of beats receivers leads to a panic due to registry conflicts.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas

Related issues

According to the otel component interface, Shutdown should wait for
global resources to be freed. In particular, Shutdown returning means
that the collector may create and start another component with the same
name, which in case of beats receivers leads to a panic due to registry
conflicts.
@swiatekm swiatekm added the bug label Feb 10, 2025
@swiatekm swiatekm requested a review from a team as a code owner February 10, 2025 13:28
@swiatekm swiatekm requested review from belimawr and rdner February 10, 2025 13:28
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 10, 2025
@swiatekm swiatekm added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Feb 10, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 10, 2025
Copy link
Contributor

mergify bot commented Feb 10, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @swiatekm? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@swiatekm swiatekm added backport-8.x Automated backport to the 8.x branch with mergify backport-9.0 Automated backport to the 9.0 branch labels Feb 10, 2025
Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank You.

@swiatekm swiatekm merged commit 7514fa9 into main Feb 10, 2025
31 checks passed
@swiatekm swiatekm deleted the fix/beats-receivers-shutdown branch February 10, 2025 16:32
mergify bot pushed a commit that referenced this pull request Feb 10, 2025
According to the otel component interface, Shutdown should wait for
global resources to be freed. In particular, Shutdown returning means
that the collector may create and start another component with the same
name, which in case of beats receivers leads to a panic due to registry
conflicts.

(cherry picked from commit 7514fa9)
mergify bot pushed a commit that referenced this pull request Feb 10, 2025
According to the otel component interface, Shutdown should wait for
global resources to be freed. In particular, Shutdown returning means
that the collector may create and start another component with the same
name, which in case of beats receivers leads to a panic due to registry
conflicts.

(cherry picked from commit 7514fa9)
swiatekm added a commit that referenced this pull request Feb 10, 2025
According to the otel component interface, Shutdown should wait for
global resources to be freed. In particular, Shutdown returning means
that the collector may create and start another component with the same
name, which in case of beats receivers leads to a panic due to registry
conflicts.

(cherry picked from commit 7514fa9)

Co-authored-by: Mikołaj Świątek <[email protected]>
swiatekm added a commit that referenced this pull request Feb 10, 2025
According to the otel component interface, Shutdown should wait for
global resources to be freed. In particular, Shutdown returning means
that the collector may create and start another component with the same
name, which in case of beats receivers leads to a panic due to registry
conflicts.

(cherry picked from commit 7514fa9)

Co-authored-by: Mikołaj Świątek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-9.0 Automated backport to the 9.0 branch bug Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants