Skip to content

OCPBUGS-95068: Close T-GM and T-BC phc2sys clock synchronization race conditions#619

Open
lack wants to merge 1 commit into
openshift:release-4.21from
lack:OCPBUGS-85586_phc2sys_ts2phc_race-4.21
Open

OCPBUGS-95068: Close T-GM and T-BC phc2sys clock synchronization race conditions#619
lack wants to merge 1 commit into
openshift:release-4.21from
lack:OCPBUGS-85586_phc2sys_ts2phc_race-4.21

Conversation

@lack

@lack lack commented Jul 1, 2026

Copy link
Copy Markdown
Member

Synchronizing the system clock too early can lead to large time offsets
that settle slowly. By delaying phc2sys from running until the PHC is
"reasonably synchronized" (ie within 1.0s offset of a trusted
timesource), we ensure small offsets only which converge quickly.

For OC and BC, this means delaying phc2sys until ptp4l offset is <1.0s
(and in the case of mutli-profile BC, choosing the proper ptp4l to
evaluate is key). In GM, we delay phc2sys until ts2phc offset is <1.0s.

Cherry-picked from OCPBUGS-85586_phc2sys_ts2phc_race-4.22 (d2ff2d1)
and adapted for the 4.21 codebase (no hardwareconfig, alias, or
v2alpha1 APIs).

Fixes: OCPBUGS-85586

Assisted-by: Claude Opus 4.6 and pi.dev
Signed-off-by: Jim Ramsay jramsay@redhat.com

Synchronizing the system clock too early can lead to large time offsets
that settle slowly.  By delaying phc2sys from running until the PHC is
"reasonably synchronized" (ie within 1.0s offset of a trusted
timesource), we ensure small offsets only which converge quickly.

For OC and BC, this means  delaying phc2sys until ptp4l offset is <1.0s
(and in the case of mutli-profile BC, choosing the proper ptp4l to
evaluate is key).  In GM, we delay phc2sys until ts2phc offset is <1.0s.

Cherry-picked from OCPBUGS-85586_phc2sys_ts2phc_race-4.22 (d2ff2d1)
and adapted for the 4.21 codebase (no hardwareconfig, alias, or
v2alpha1 APIs).

Fixes: OCPBUGS-85586

Assisted-by: Claude Opus 4.6 and pi.dev
Signed-off-by: Jim Ramsay <jramsay@redhat.com>
@openshift-ci openshift-ci Bot requested review from josephdrichard and vitus133 July 1, 2026 00:59
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@lack: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@lack

lack commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/jira cherry-pick OCPBUGS-94177

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@lack: Jira Issue OCPBUGS-94177 has been cloned as Jira Issue OCPBUGS-95068. Will retitle bug to link to clone.
/retitle OCPBUGS-95068: Close T-GM and T-BC phc2sys clock synchronization race conditions

Details

In response to this:

/jira cherry-pick OCPBUGS-94177

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-ci openshift-ci Bot changed the title Close T-GM and T-BC phc2sys clock synchronization race conditions OCPBUGS-95068: Close T-GM and T-BC phc2sys clock synchronization race conditions Jul 1, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@lack: This pull request references Jira Issue OCPBUGS-95068, which is invalid:

  • expected dependent Jira Issue OCPBUGS-94177 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

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:

Synchronizing the system clock too early can lead to large time offsets
that settle slowly. By delaying phc2sys from running until the PHC is
"reasonably synchronized" (ie within 1.0s offset of a trusted
timesource), we ensure small offsets only which converge quickly.

For OC and BC, this means delaying phc2sys until ptp4l offset is <1.0s
(and in the case of mutli-profile BC, choosing the proper ptp4l to
evaluate is key). In GM, we delay phc2sys until ts2phc offset is <1.0s.

Cherry-picked from OCPBUGS-85586_phc2sys_ts2phc_race-4.22 (d2ff2d1)
and adapted for the 4.21 codebase (no hardwareconfig, alias, or
v2alpha1 APIs).

Fixes: OCPBUGS-85586

Assisted-by: Claude Opus 4.6 and pi.dev
Signed-off-by: Jim Ramsay jramsay@redhat.com

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.

@lack

lack commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@lack: This pull request references Jira Issue OCPBUGS-95068, 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.21.z) matches configured target version for branch (4.21.z)
  • 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-94177 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-94177 targets the "4.22.0" version, which is one of the valid target versions: 4.22.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.

@lack

lack commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/label backport-risk-assessed

@openshift-ci openshift-ci Bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jul 1, 2026
@lack

lack commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/verified later @Bonnie-Block

@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@lack: This PR has been marked to be verified later by @Bonnie-Block.

Details

In response to this:

/verified later @Bonnie-Block

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.

@lack

lack commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-4.20

@openshift-cherrypick-robot

Copy link
Copy Markdown

@lack: once the present PR merges, I will cherry-pick it on top of release-4.20 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.20

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.

@sebsoto

sebsoto commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

/approve

@sebsoto

sebsoto commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lack, sebsoto
Once this PR has been reviewed and has the lgtm label, please assign josephdrichard for approval. For more information see the Code Review Process.

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

Details 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-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.