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

OCPBUGS-3667: Fix CLOCK_REALTIME going to HOLDOVER in metrics #170

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugins/ptp_operator/metrics/ptp4lParse.go
Expand Up @@ -115,7 +115,7 @@ func (p *PTPEventManager) ParsePTP4l(processName, configName, profileName, outpu
UpdateInterfaceRoleMetrics(processName, ptpIFace, role)
}
if lastRole != types.SLAVE {
return // no need to go to holdover state if the Fault was in master(slave) port
return // no need to go to holdover state if the Fault was not in master(slave) port
}
if _, ok := ptpStats[master]; !ok { //
log.Errorf("no offset stats found for master for portid %d with role %s (the port started in fault state)", portID, role)
Expand All @@ -126,6 +126,7 @@ func (p *PTPEventManager) ParsePTP4l(processName, configName, profileName, outpu
// make any slave interface master offset to FREERUN
if syncState != "" && syncState != ptpStats[master].LastSyncState() && syncState == ptp.HOLDOVER {
// Put master in HOLDOVER state
ptpStats[master].SetRole(role) // update slave port as faulty
alias := ptpStats[master].Alias()
masterResource := fmt.Sprintf("%s/%s", alias, MasterClockType)
p.PublishEvent(syncState, ptpStats[master].LastOffset(), masterResource, ptp.PtpStateChange)
Expand Down