Skip to content

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

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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lack
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 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant