Skip to content

OCPBUGS-105877: [release-4.22] Fix duplicate TriggerLogs calls on multi-process - #732

Open
nocturnalastro wants to merge 2 commits into
redhat-cne:release-4.22from
nocturnalastro:cherry-pick-OCPBUGS-104533-4.22
Open

OCPBUGS-105877: [release-4.22] Fix duplicate TriggerLogs calls on multi-process#732
nocturnalastro wants to merge 2 commits into
redhat-cne:release-4.22from
nocturnalastro:cherry-pick-OCPBUGS-104533-4.22

Conversation

@nocturnalastro

Copy link
Copy Markdown
Contributor

Manual cherry-pick of #727

Each daemon-side ptp4l/phc2sys process opens its own socket connection
to CEP. The listenToSocket accept loop spawns a separate processMessages
goroutine per connection, and each one unconditionally called
TriggerLogs(), which hits the daemon's /emit-logs endpoint. With N
processes this caused N replay cycles of the stale portRole cache,
interleaving stale port-state events with live data and preventing
the system from reaching LOCKED state for several minutes.

Gate TriggerLogs with sync.Once so only the first accepted connection
triggers the replay. The Once resets naturally when CEP restarts via
syscall.Exec.

Generated-by: Cursor
Addresses CodeRabbit review: read the package-level eventManager into
a local variable so the goroutine closure captures the checked value
rather than re-reading the global.

Generated-by: Cursor
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b65d286-2647-4feb-a049-106009dd8acf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nocturnalastro nocturnalastro changed the title [release-4.22] Fix duplicate TriggerLogs calls on multi-process OCPBUGS-105877: [release-4.22] Fix duplicate TriggerLogs calls on multi-process Aug 12, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@nocturnalastro: This pull request references Jira Issue OCPBUGS-105877, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Manual cherry-pick of #727

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@vitus133 vitus133 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nocturnalastro, vitus133

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [nocturnalastro,vitus133]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the lgtm label Aug 12, 2026
@nocturnalastro

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@nocturnalastro: This pull request references Jira Issue OCPBUGS-105877, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-104533 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-104533 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Jira (bblock@redhat.com), skipping review request.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants