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 1995913: Degraded status in the OCM controller #486

Conversation

tremes
Copy link
Contributor

@tremes tremes commented Aug 16, 2021

This adds status checking to the OCM controller. If the response from the OCM API is an HTTP error other than 404 (which means that SCA certs are not allowed for the given organization) then try again with exponential backoff and after few attempts mark the operator as degraded.
At the same time, the status doesn't have to be changed to degraded in a disconnected environment. This means that any non-HTTP error is not considered as a reason for marking the operator as degraded.

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

No new data

Documentation

No documentation update

Unit Tests

No new test

Privacy

Yes. There are no sensitive data in the newly collected information.

Changelog

Breaking Changes

No

References

https://issues.redhat.com/browse/???
https://bugzilla.redhat.com/show_bug.cgi?id=1995913
https://access.redhat.com/solutions/???

@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 Aug 16, 2021
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2021
@tremes tremes changed the title WIP: Degraded status in the OCM controller Degraded status in the OCM controller Aug 17, 2021
@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 Aug 17, 2021
if err != nil {
return nil, fmt.Errorf("timed out waiting for the successful response from %s", endpoint)
}
return data, nil
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method is little bit complicated (especially due the fact that 404 and offline env. are not considered as errors from the "degraded" perspective) compared to counting the threshold in the controllerstatus and the checking it in the status.go (similarly as here)

The approach with exp. backoff is more "agressive":

  • if HTTP error other than 404 then try again in 5 min (if this is still true then try again in 10 min, 20min, 40min => mark as degraded)

Compared to the other approach:

  • if HTTP error other than 404 then only increase the count and do nothing
  • try again in default period (which is 8h in this case) if there's still an error then increase the count again
  • if count higher than some threshold (let's say 2 or 3) then mark IO as degraded

WIth the first approach we can go degraded in ~1h15min, with the second one it would be after 16h-24h. I am not sure what is better TBH. The certs are valid for a long time (1 year by default), but on the other hand, if the content changes then you may want to update the certs quickly.

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 updated the initial backoff step to c.configurator.Config().OCMConfig.Interval / 32 (that is 15 minutes by default) so the times are bit longer than mentioned above.

@tremes
Copy link
Contributor Author

tremes commented Aug 18, 2021

/test insights-operator-e2e-tests

@tremes
Copy link
Contributor Author

tremes commented Aug 20, 2021

/retest

@tremes tremes changed the title Degraded status in the OCM controller Bug 1995913: Degraded status in the OCM controller Aug 20, 2021
@openshift-ci
Copy link

openshift-ci bot commented Aug 20, 2021

@tremes: This pull request references Bugzilla bug 1995913, 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.

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

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

In response to this:

Bug 1995913: Degraded status in the OCM controller

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 bugzilla/severity-medium Referenced Bugzilla bug's severity is medium 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 20, 2021
@openshift-ci
Copy link

openshift-ci bot commented Aug 20, 2021

@tremes: This pull request references Bugzilla bug 1995913, which is valid.

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

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

In response to this:

Bug 1995913: Degraded status in the OCM controller

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.

@tremes
Copy link
Contributor Author

tremes commented Aug 23, 2021

/retest

1 similar comment
@tremes
Copy link
Contributor Author

tremes commented Aug 25, 2021

/retest

@rluders
Copy link
Contributor

rluders commented Aug 26, 2021

Tested and it seems good.
/lgtm

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

openshift-ci bot commented Aug 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rluders, tremes

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-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

12 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@tremes
Copy link
Contributor Author

tremes commented Aug 29, 2021

/test insights-operator-e2e-tests

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

10 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@iNecas
Copy link
Contributor

iNecas commented Aug 31, 2021

/test insights-operator-e2e-tests

@iNecas
Copy link
Contributor

iNecas commented Aug 31, 2021

/retest

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit d97e3c8 into openshift:master Aug 31, 2021
@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2021

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

Bugzilla bug 1995913 has been moved to the MODIFIED state.

In response to this:

Bug 1995913: Degraded status in the OCM controller

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-medium Referenced Bugzilla bug's severity is medium 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants