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

PTP Events Generating Redundant Noise for Repeated FREERUN State Transitions #365

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

aneeshkp
Copy link
Member

@aneeshkp aneeshkp commented Oct 21, 2024

Fixes issue introduced in this PR #352
PR Description:
This PR addresses the issue of redundant PTP events being generated when the system repeatedly sends events indicating the FREERUN state, even though the previous state was already FREERUN. This behavior introduces unnecessary noise in the event stream, making it harder to track meaningful state changes and creating clutter in logs and monitoring systems.
Changes Introduced:
State transition logic updated to prevent duplicate events when the system remains in the same FREERUN state.

@openshift-ci-robot
Copy link

@aneeshkp: This pull request references Jira Issue OCPBUGS-43643, which is invalid:

  • expected the bug to target the "4.18.0" version, but no target version was set

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.

In response to this:

PR Description:
This PR addresses the issue of redundant PTP events being generated when the system repeatedly sends events indicating the FREERUN state, even though the previous state was already FREERUN. This behavior introduces unnecessary noise in the event stream, making it harder to track meaningful state changes and creating clutter in logs and monitoring systems.
Changes Introduced:
State transition logic updated to prevent duplicate events when the system remains in the same FREERUN state.

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.

@aneeshkp
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yliu127

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.

Copy link
Contributor

openshift-ci bot commented Oct 21, 2024

@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: yliu127.

Note that only redhat-cne members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

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

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yliu127

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.

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 kubernetes-sigs/prow repository.

}
log.Warnf("%s sync state %s, last ptp state is unknown, setting to %s", eventResourceName, clockState, lastClockState)
Copy link
Member

@jzding jzding Oct 22, 2024

Choose a reason for hiding this comment

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

this is wrong, should be
log.Warnf("%s sync state %s, last ptp state %s is unknown, setting to %s", eventResourceName, ptp.LOCKED, lastClockState, clockState)

Copy link
Member Author

Choose a reason for hiding this comment

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

resolved

if lastClockState != ptp.FREERUN { // don't send event if last event was freerun
log.Infof(" publishing event for (profile %s) %s with last state %s and current clock state %s and offset %d for ( Max/Min Threshold %d/%d )",
ptpProfileName, eventResourceName, oStats.LastSyncState(), clockState, ptpOffset, threshold.MaxOffsetThreshold, threshold.MinOffsetThreshold)
p.PublishEvent(clockState, ptpOffset, eventResourceName, eventType) // change to locked
Copy link
Member

Choose a reason for hiding this comment

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

remove the comment. it is change to freerun, not locaked

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed the issue and made few changes, please review again

@aneeshkp aneeshkp force-pushed the reduce-event-noise branch 2 times, most recently from 31f11fe to 0928ced Compare October 22, 2024 18:00
…sitions

Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
Copy link
Member

@jzding jzding left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Oct 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aneeshkp, jzding

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@openshift-merge-bot openshift-merge-bot bot merged commit 6aefbbe into redhat-cne:main Oct 22, 2024
4 of 5 checks passed
@openshift-ci-robot
Copy link

@aneeshkp: Jira Issue OCPBUGS-43643: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-43643 has been moved to the MODIFIED state.

In response to this:

PR Description:
This PR addresses the issue of redundant PTP events being generated when the system repeatedly sends events indicating the FREERUN state, even though the previous state was already FREERUN. This behavior introduces unnecessary noise in the event stream, making it harder to track meaningful state changes and creating clutter in logs and monitoring systems.
Changes Introduced:
State transition logic updated to prevent duplicate events when the system remains in the same FREERUN state.

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: cloud-event-proxy
This PR has been included in build cloud-event-proxy-container-v4.18.0-202410222209.p0.g6aefbbe.assembly.stream.el9.
All builds following this will include this PR.

@aneeshkp aneeshkp changed the title OCPBUGS-43643: PTP Events Generating Redundant Noise for Repeated FREERUN State Transitions PTP Events Generating Redundant Noise for Repeated FREERUN State Transitions Oct 23, 2024
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.

4 participants