-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add ptp ha metrics #294
Add ptp ha metrics #294
Conversation
d34a052
to
b82e26b
Compare
index := FindInPhc2SysLogForCfgFileIndex(output) | ||
state = -1 | ||
if index == -1 { | ||
log.Errorf("config name is not found in log outpt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print out content of output to help debug the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -74,12 +75,12 @@ const ( | |||
|
|||
// ExtractMetrics ... extract metrics from ptp logs. | |||
func (p *PTPEventManager) ExtractMetrics(msg string) { | |||
defer func() { | |||
/*defer func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete if code not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks we need this to prevent restarts of the pod
// ptp stats goes by config either ptp4l ot pch2sys | ||
// master (slave) interface can be configured in ptp4l but offset provided by ts2phc | ||
|
||
ptpStats := p.GetStats(types.ConfigName(configName)) | ||
profileName := ptp4lCfg.Profile | ||
|
||
if len(ptp4lCfg.Interfaces) == 0 { //TODO: Use PMC to update port and roles | ||
log.Errorf("file watcher have not picked the files yet or ptp4l doesn't have config") | ||
if !p.hasHAProfile(profileName) && profileName != "" && len(ptp4lCfg.Interfaces) == 0 { //TODO: Use PMC to update port and roles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check profileName first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return | ||
} | ||
|
||
if profileName == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can move this to before line 113.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
b82e26b
to
deb5183
Compare
@aneeshkp: The following test failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
deb5183
to
8893d5c
Compare
Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
8893d5c
to
145eb16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aneeshkp, jzding The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e9e6f0d
into
redhat-cne:main
[ART PR BUILD NOTIFIER] This PR has been included in build cloud-event-proxy-container-v4.16.0-202403221545.p0.ge9e6f0d.assembly.stream.el9 for distgit cloud-event-proxy. |
HELP openshift_ptp_ha_profile_status 0 = INACTIVE 1 = ACTIVE 0 # TYPE openshift_ptp_ha_profile_status gauge openshift_ptp_ha_profile_status{node="node1",process="phc2sys",profile="profile1"} 1 openshift_ptp_ha_profile_status{node="node1",process="phc2sys",profile="profile2"} 0
known issue