Closed vitus133 closed 3 months ago
@vitus133: This pull request references Jira Issue OCPBUGS-37043, which is valid. The bug has been moved to the POST state.
Requesting review from QA contact: /cc @gsr-shanks
The bug has been updated to refer to the pull request using the external bug tracker.
/label backport-risk-assessed
@vitus133: all tests passed!
Full PR test history. Your PR dashboard.
/retitle [release-4.16] OCPBUGS-37043: prevent writing uninitialized TimePropertiesDS
/lgtm
/label cherry-pick-approved
@aneeshkp: Can not set label cherry-pick-approved: Must be member in one of these teams: []
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: aneeshkp, vitus133
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/label cherry-pick-approved
@vitus133: Jira Issue OCPBUGS-37043: All pull requests linked via external trackers have merged:
Jira Issue OCPBUGS-37043 has been moved to the MODIFIED state.
[ART PR BUILD NOTIFIER]
Distgit: linuxptp-daemon This PR has been included in build ose-linuxptp-daemon-container-v4.16.0-202407291537.p0.g382c824.assembly.stream.el9. All builds following this will include this PR.
/cherrypick release-4.15
@vitus133: #341 failed to apply on top of branch "release-4.15":
Applying: prevent writing uninitialized TimePropertiesDS
Using index info to reconstruct a base tree...
M pkg/daemon/daemon.go
M pkg/leap/leap-file.go
M pkg/leap/leap-file_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/leap/leap-file_test.go
CONFLICT (content): Merge conflict in pkg/leap/leap-file_test.go
Auto-merging pkg/leap/leap-file.go
CONFLICT (content): Merge conflict in pkg/leap/leap-file.go
Auto-merging pkg/daemon/daemon.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 prevent writing uninitialized TimePropertiesDS
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
This PR fixes a bug where the daemon wrote uninitialized values to the time properties dataset, which led to corrupting the ptp time scale, current UTC offset and other dataset properties. The fix is done by always initializing the time properties according to the current UTC offset and a predefined set of flags. Leap manager was changed to provide current UTC offset to external packages.
This is a manual cherrypick of #335 /cc @aneeshkp @jzding @josephdrichard @nishant-parekh