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

Add ptp ha metrics #294

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Conversation

aneeshkp
Copy link
Member

@aneeshkp aneeshkp commented Mar 15, 2024

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

  1. threshold metrics are not getting cleared when ptp ha are deleted

index := FindInPhc2SysLogForCfgFileIndex(output)
state = -1
if index == -1 {
log.Errorf("config name is not found in log outpt")
Copy link
Member

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.

Copy link
Member Author

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() {
Copy link
Member

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.

Copy link
Member Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check profileName first

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return
}

if profileName == "" {
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

openshift-ci bot commented Mar 21, 2024

@aneeshkp: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws deb5183 link false /test e2e-aws

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.

Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
Copy link
Member

@jzding jzding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

openshift-ci bot commented Mar 22, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit e9e6f0d into redhat-cne:main Mar 22, 2024
4 of 5 checks passed
@openshift-bot
Copy link
Contributor

[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.
All builds following this will include this PR.

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

Successfully merging this pull request may close these issues.

3 participants