ptp_operator: resolve master alias before publishing HOLDOVER event#677
Open
edcdavid wants to merge 3 commits into
Open
ptp_operator: resolve master alias before publishing HOLDOVER event#677edcdavid wants to merge 3 commits into
edcdavid wants to merge 3 commits into
Conversation
When the HOLDOVER path in ParsePTP4l fires during ptp4l startup, the alias on ptpStats[master] may not yet be populated because no "master offset" log line has been parsed for the new process. This causes the ptp-state-change event to be published on the bare ResourceAddress ".../master" instead of ".../ens3fx/master". Subsequent recovery events use the per-interface address, so the aggregate ".../master" channel is never updated past HOLDOVER. Resolve the alias from the ptp4l config's slave interface (GetAliasByInterface) when the cached value is empty, matching the pattern already used by the clock-class-change and master-offset paths. The resolved alias is cached via SetAlias so that the holdover timeout goroutine also uses the correct value.
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: edcdavid The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Verify that when ptpStats[master] has no cached alias, the HOLDOVER path in ParsePTP4l resolves it from the ptp4l config's slave interface via GetAliasByInterface and caches it with SetAlias.
Removed GOPATH and GOROOT checks from the Makefile to streamline the build process. Updated the 'gha' target to directly build plugins and run unit tests with coverage, excluding specific directories for accurate coverage results. Modified the unit-test.sh script to filter coverage output more effectively. Additionally, adjusted the coverage-gate.sh script to ensure proper restoration of the Makefile and unit-test.sh after execution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the HOLDOVER path in ParsePTP4l fires during ptp4l startup, the
alias on ptpStats[master] may not yet be populated because no
"master offset" log line has been parsed for the new process. This
causes the ptp-state-change event to be published on the bare
ResourceAddress ".../master" instead of ".../ens3fx/master". Subsequent
recovery events use the per-interface address, so the aggregate
".../master" channel is never updated past HOLDOVER.
Resolve the alias from the ptp4l config's slave interface
(GetAliasByInterface) when the cached value is empty, matching the
pattern already used by the clock-class-change and master-offset paths.
The resolved alias is cached via SetAlias so that the holdover timeout
goroutine also uses the correct value.