Description of problem: "insightsclient_request_recvreport_total" is always incremented, even when the same Insights report is downloaded again. Expected results: The metric should be incremented only when a new Insights report is downloaded Additional info:
Verified on 4.10.0-0.nightly-2021-10-08-050801. Verification steps: 1. Provision a cluster 2. Wait until IO will send the archive to console.redhat.com and retrieve the report from it 3. Save the report from this endpoint https://console.redhat.com/api/insights-results-aggregator/v1/clusters/<cluster_id>/report 4. Provision a mock server (https://mock-server.com) 5. Configure it to respond on /api/insights-results-aggregator/v1/clusters/<cluster_id>/report using saved report from paragraph 3 6. Add a new key "reportEndpoint" in the "support" secret in the "openshift-config" namespace with value "https://<mock server hostname>/api/insights-results-aggregator/v1/clusters/%s/report" 7. Restart the Insights Operator 8. Wait until it retrieves several reports In the logs you should see: I1008 10:47:17.766877 1 insightsreport.go:72] Pulling report from smart-proxy I1008 10:47:17.767041 1 insightsreport.go:84] Retrieving report I1008 10:47:17.767278 1 insightsclient.go:300] Retrieving report for cluster: 98bc3ee3-2461-4e3f-a85f-4dd2476cca8b I1008 10:47:17.767328 1 insightsclient.go:301] Endpoint: https://<mock server hostname>/api/insights-results-aggregator/v1/clusters/98bc3ee3-2461-4e3f-a85f-4dd2476cca8b/report I1008 10:47:17.775920 1 insightsclient.go:311] Retrieving report from https://<mock server hostname>/api/insights-results-aggregator/v1/clusters/98bc3ee3-2461-4e3f-a85f-4dd2476cca8b/report I1008 10:47:18.034649 1 insightsreport.go:119] Report retrieved I1008 10:47:18.034832 1 insightsreport.go:127] Smart Proxy report correctly parsed I1008 10:47:18.034872 1 insightsreport.go:130] Retrieved report is equal to previus one. Retrying... E1008 10:47:18.034889 1 insightsreport.go:171] Unrecoverable problem retrieving the report: report not updated 9. Get cluster's prometheus url in a route in "openshift-monitoring" namespace. 10. Make a query for "insightsclient_request_recvreport_total" metric it should be not incremented from the time you changed the "reportEndpoint"
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