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 1991010: pkg/cvo/metrics: Ignore Degraded for cluster_operator_up #638

Conversation

wking
Copy link
Member

@wking wking commented Aug 6, 2021

Bringing #550 back to 4.7. By hand, since there are neighbor-line conflicts with #587, which landed first in 4.7, but is backported from changes that landed later in master/4.8.

Fixing a TODO from 02a389b (sync: Temporarily stop checking version
in ClusterOperator.Status, 2019-01-23, openshift#98).  The semantics of the
'operator' entry have been clear since at least
openshift/api@40c55f8085 (config/v1/types_cluster_operator:
ClusterOperatorStatus doc wordsmithing, 2019-10-28,
openshift/api#501).
ClusterOperatorDown is based on cluster_operator_up, but we also have
ClusterOperatorDegraded based on
cluster_operator_conditions{condition="Degraded"}.  Firing
ClusterOperatorDown for operators which are Available=True and
Degraded=True confuses users [1].  ClusterOperatorDegraded will also
be firing.  With this commit, I'm adjusting cluster_operator_up to
only care about Available, to decouple the two alerts and bring them
in line with their existing "has not been available" and "has been
degraded" descriptions.

However, IsOperatorStatusConditionTrue requires the condition to be
present, and cluster_operator_conditions only creates entries when the
conditions are present.  To guard against the Degraded-unset condition
in ClusterOperatorDegraded, I'm covering with an 'or' [2] and 'group
by' [3] guard.  So we should have the following cases:

* Available unset or != True: ClusterOperatorDown will fire.
* Available=True, Degraded unset or != False: ClusterOperatorDegraded
  will fire.  Firing on unset is new in this commit.  Not firing
  ClusterOperatorDown here is new in this commit.
* Available=True, Degraded=False: Neither alert fires.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1834551#c0
[2]: https://prometheus.io/docs/prometheus/latest/querying/operators/#logical-set-binary-operators
[3]: https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators
@openshift-ci openshift-ci bot added bugzilla/severity-low Referenced Bugzilla bug's severity is low 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 Aug 6, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 6, 2021

@wking: This pull request references Bugzilla bug 1991010, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.z) matches configured target release for branch (4.7.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1834551 is in the state CLOSED (ERRATA), which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 1834551 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0, 4.8.z
  • bug has dependents

Requesting review from QA contact:
/cc @jianlinliu

In response to this:

Bug 1991010: pkg/cvo/metrics: Ignore Degraded for cluster_operator_up

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2021
@wking
Copy link
Member Author

wking commented Aug 7, 2021

/retest

@wking
Copy link
Member Author

wking commented Aug 7, 2021

Failures should be fixed by openshift/release#20978.

/retest

@jottofar
Copy link
Contributor

jottofar commented Aug 9, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jottofar, wking

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

@bparees bparees added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Aug 11, 2021
@openshift-ci openshift-ci bot merged commit cc81827 into openshift:release-4.7 Aug 11, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 11, 2021

@wking: All pull requests linked via external trackers have merged:

Bugzilla bug 1991010 has been moved to the MODIFIED state.

In response to this:

Bug 1991010: pkg/cvo/metrics: Ignore Degraded for cluster_operator_up

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.

@wking wking deleted the decouple-degraded-from-ClusterOperatorDown branch October 7, 2021 02:48
@wking
Copy link
Member Author

wking commented Oct 7, 2021

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 2021

@wking: All pull requests linked via external trackers have merged:

Bugzilla bug 1991010 has been moved to the MODIFIED state.

In response to this:

/bugzilla refresh

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/severity-low Referenced Bugzilla bug's severity is low 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. 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

3 participants