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

Bug 2092880: add static pod revision metrics #852

Closed
wants to merge 1 commit into from
Closed

Bug 2092880: add static pod revision metrics #852

wants to merge 1 commit into from

Conversation

tjungblu
Copy link
Contributor

No description provided.

@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jun 10, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 10, 2022

@tjungblu: This pull request references Bugzilla bug 2092880, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @geliu2016

In response to this:

Bug 2092880: add static pod revision metrics

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.

Copy link

@geliu2016 geliu2016 left a comment

Choose a reason for hiding this comment

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

/lgtm
/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jun 10, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 10, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: geliu2016, tjungblu
To complete the pull request process, please assign dusk125 after the PR has been reviewed.
You can assign the PR to them by writing /assign @dusk125 in a comment when ready.

The full list of commands accepted by this bot can be found 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


revGauge := prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "etcd_operator",
Name: "static_pod_current_revision",
Copy link
Member

Choose a reason for hiding this comment

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

Checking one of your presubmits here in PromeCIeus:

sort_desc(count by (__name__) ({__name__=~".*revision.*"}))

finds:

etcd_debugging_auth_revision{}
etcd_debugging_mvcc_compact_revision{}
etcd_debugging_mvcc_current_revision{}
kube_statefulset_status_current_revision{}
kube_statefulset_status_update_revision{}

So... I don't see your new metric. And maybe it should be called static_pod_status_current_revision? Squatting on a generic metric name with etcd-specific code feels brittle... etcd_static_pod_status_current_revision? Or get the Gauge definition landed in library-go, where all interested static-pod consumers can share it?

@@ -137,6 +151,10 @@ func (c *EnvVarController) checkEnvVars() error {
return err
}

for _, status := range operatorStatus.NodeStatuses {
c.revisionGauge.WithLabelValues(status.NodeName).Set(float64(status.CurrentRevision))
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't seem to work. I think you're missing the piping-it-into-channel, like this. Although I'm a bit fuzzy on how the existing etcd-operator metrics are wired up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to pipe it into a channel, I thought registering it is enough to be scrapped, or ?

Copy link
Member

@wking wking Jun 15, 2022

Choose a reason for hiding this comment

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

Hrm, yeah, it looks like that is one way to do things. And see here for an example using Collect. Might need to ask the monitoring folks to help figure out why your current code doesn't seem to be working.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, where are you setting up your metrics listener? Grepping around in the operator code, I'm not finding it...

@Elbehery
Copy link
Contributor

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 14, 2022

@tjungblu: all tests passed!

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.

@tjungblu
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 15, 2022
@tjungblu tjungblu closed this Aug 16, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 16, 2022

@tjungblu: This pull request references Bugzilla bug 2092880. The bug has been updated to no longer refer to the pull request using the external bug tracker.

In response to this:

Bug 2092880: add static pod revision metrics

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.

@tjungblu tjungblu deleted the revmetrics branch November 28, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants