Bug 2022251 - wait interval in case of a failed upload due to 403 is unnecessarily long
Summary: wait interval in case of a failed upload due to 403 is unnecessarily long
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Insights Operator
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.10.0
Assignee: Tomas Remes
QA Contact: Joao Fula
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-11 07:51 UTC by Tomas Remes
Modified: 2022-03-10 16:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:26:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift insights-operator pull 538 0 None open Bug 2022251: Shorter delay in case of HTTP 403 during upload 2021-11-11 07:52:05 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:27:16 UTC

Description Tomas Remes 2021-11-11 07:51:18 UTC
The current wait interval in case of failed upload due to HTTP 403 response is (2h,8h) given the default gathering interval is 2h. 

I think it makes sense to make this interval shorter.

Comment 2 Joao Fula 2021-12-01 09:24:15 UTC
Verified on 4.10.0-0.ci-2021-11-30-141534.
 
Verification steps:

1. Modify/Create support secret with the following keys/values:
  endpoint: https://httpbin.org/status/403
  interval: 5m
2. Restart insights operator
3. Verify insights operator logs and search for the following:
"Configuration updated: enabled=true endpoint=https://httpbin.org/status/403 interval=5m0s username=false token=true reportEndpoint=https://cloud.redhat.com/api/insights-results-aggregator/v1/clusters/%s/report initialPollingDelay=1m0s minRetryTime=30s pollingTimeout=50m0s"

Comment 3 Joao Fula 2021-12-01 14:19:34 UTC
Correction:

Verified on 4.10.0-0.ci-2021-12-01-042705.
 
Verification steps:

1. Modify/Create support secret with the following keys/values:
  namespace: openshift-config
  endpoint: https://httpbin.org/status/403
  interval: 5m
2. Restart insights operator
3. Verify insights operator logs and search for the following:
  "I1201 13:35:01.887203       1 insightsclient.go:269] gateway server https://httpbin.org/status/403 returned 403, x-rh-insights-request-id="
  ...
  "I1201 13:39:09.113525       1 insightsclient.go:269] gateway server https://httpbin.org/status/403 returned 403, x-rh-insights-request-id="
  ...
  "I1201 13:45:09.631824       1 insightsclient.go:269] gateway server https://httpbin.org/status/403 returned 403, x-rh-insights-request-id="

  There will be 5 attempts before being marked as degraded.
  The time between attempts has to be between [interval/2, interval/2 + 2 * interval/2]
  In our case, [2.5m, 7.5m]

Comment 4 Joao Fula 2021-12-01 14:22:43 UTC
Correction:

In step 1, the namespace should be openshift-config but it is not a key/value.

Comment 7 errata-xmlrpc 2022-03-10 16:26:42 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


Note You need to log in before you can comment on or make changes to this bug.