Bug 2001823

Summary: OCM controller must update operator status
Product: OpenShift Container Platform Reporter: Dmitry Misharov <dmisharo>
Component: Insights OperatorAssignee: Tomas Remes <tremes>
Status: CLOSED ERRATA QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.10CC: aos-bugs, inecas, mklika, tremes
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2004816 (view as bug list) Environment:
Last Closed: 2022-03-10 16:07:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2004816    

Description Dmitry Misharov 2021-09-07 09:30:19 UTC
Description of problem:

The current OCM controller (if enabled via TechPreview feature set) is pulling down the SCA certs from the OCM API. We would like to update the operator status (operator conditions) based on successful or unsuccessful retrieval of the SCA certs. A retrieval is considered as unsuccessful if OCM API returns a 500 or 400 status codes. If the controller is not able to retrieve the certs after some number retries then mark the operator as degraded. 

Actual results:

No status is updated.

Expected results:

Status is marked either as healthy or degraded when the controller was not able to retrieve the SCA certs after some number of retries (likely using exp. backoff).

Comment 2 Dmitry Misharov 2021-09-16 07:17:40 UTC
Verified on 4.10.0-0.ci-2021-09-16-014803.
Verification steps:
1. Enable TechPreview https://docs.openshift.com/container-platform/4.8/nodes/clusters/nodes-cluster-enabling-features.html
2. Edit "support" secret in "openshift-config" namespace.
   a. Add "ocmEndpoint" key with value "https://httpstat.us/500"
   b. Add "ocmInterval" key with value "1m"
3. Restart Insights Operator
4. Check Insights Cluster Operator status

Operator status is degraded.

Change "ocmEndpoint" to "https://httpstat.us/404" or another status and check cluster operator status. It's not degraded.

Comment 5 errata-xmlrpc 2022-03-10 16:07:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056