Skip to content

flowlogs: cleanup socket when creating local reporter #10276

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

Merged
merged 2 commits into from
Apr 23, 2025

Conversation

mazdakn
Copy link
Member

@mazdakn mazdakn commented Apr 22, 2025

Description

Always try to clean up local socket when starting up flowlogs local flow server. This prevents cases where local socket is not cleaned up from previous runs, which leads to this error:

2025-04-22 21:03:05.728 [ERROR][290] node/server.go 114: Failed to listen on local socket error=listen unix /var/run/calico/flows/flows.sock: bind: address already in use
2025-04-22 21:03:05.729 [ERROR][290] node/flowlogs.go 46: Failed to start local flow server error=listen unix /var/run/calico/flows/flows.sock: bind: address already in use

Related issues/PRs

Related to #10144

Todos

  • Tests
  • Documentation
  • Release note

Release Note

TBD

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@mazdakn mazdakn added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Apr 22, 2025
@mazdakn mazdakn requested a review from a team as a code owner April 22, 2025 22:01
@marvin-tigera marvin-tigera added this to the Calico v3.31.0 milestone Apr 22, 2025
@mazdakn mazdakn merged commit 86ce2f2 into projectcalico:master Apr 23, 2025
3 checks passed
@mazdakn mazdakn deleted the flowlog-tool-cleanup branch April 23, 2025 18:56
mazdakn added a commit to mazdakn/calico that referenced this pull request May 7, 2025
@mazdakn mazdakn mentioned this pull request May 7, 2025
3 tasks
lubronzhan pushed a commit to lubronzhan/calico that referenced this pull request May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants