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-13696: Warn about CBT enabled VMs via vsphere-problem-detector #371

Merged
merged 2 commits into from Jun 27, 2023

Conversation

vr4manta
Copy link
Contributor

Added new alert for CBT Check

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid 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 May 23, 2023
@openshift-ci-robot
Copy link
Contributor

@vr4manta: This pull request references Jira Issue OCPBUGS-13696, which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Jira (wduan@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Added new alert for CBT Check

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.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 23, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@vr4manta vr4manta marked this pull request as ready for review May 26, 2023 13:42
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 26, 2023
@openshift-ci openshift-ci bot requested review from dobsonj and jsafrane May 26, 2023 13:43
@gnufied
Copy link
Member

gnufied commented May 26, 2023

cc @jsafrane

- alert: VSphereOpenshiftVmsCBTMismatch
# Using min_over_time to make sure the metric is `1` for whole 5 minutes.
# A missed scraping (e.g. due to a pod restart) will result in prometheus re-evaluating the the alerting rule.
expr: min_over_time(vsphere_vm_cbt_checks{cbt=~"enabled"}[5m]) > 0 and ignoring (cbt) min_over_time(vsphere_vm_cbt_checks{cbt=~"disabled"}[5m]) > 0
Copy link
Member

Choose a reason for hiding this comment

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

Do you know why we need ignoring(cbt) here?

Copy link
Member

Choose a reason for hiding this comment

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

IMO and on() should work here as well.

Copy link
Contributor Author

@vr4manta vr4manta Jun 26, 2023

Choose a reason for hiding this comment

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

Sorry, I just realized we didn't finish this. Without ignore, it would not work. I did a quick research on how to get this "and" clause to work and this was a recommendation. I can try on to see if that works. Is there a reason to avoid ignoring?

To clarify why I used ignore, in my attempt to create this alert, I learned that I cannot do an "and" against the same metric with different variable values. In this case doing enabled vs disabled. From my research, after the and, by default the expression wants the "cbt" variable to be same value. So by putting the ignore, its ignoring the cbt values from before "and". Looking into on() function, it looks like this may be a similar way of solving the problem. I am currently looking into recreating issue again and verify on() function will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have tested using on() function and it is working. I've checked in that version based on your recommendation. Thanks!

Renamed mismatch to match changes to code

Renamed mismatch to match changes to code
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 27, 2023

@vr4manta: The following tests 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-ovn-vsphere d85e1cf link false /test e2e-ovn-vsphere
ci/prow/e2e-vsphere-csi d85e1cf link false /test e2e-vsphere-csi

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.

@vr4manta vr4manta requested a review from gnufied June 27, 2023 14:23
@gnufied
Copy link
Member

gnufied commented Jun 27, 2023

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, vr4manta

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 27, 2023
@openshift-merge-robot openshift-merge-robot merged commit ab03ebe into openshift:master Jun 27, 2023
12 of 14 checks passed
@openshift-ci-robot
Copy link
Contributor

@vr4manta: Jira Issue OCPBUGS-13696: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-13696 has been moved to the MODIFIED state.

In response to this:

Added new alert for CBT Check

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants