Bug 1797512 - UnmarshalError appears when define invalid regionEndpoint for registry operator
Summary: UnmarshalError appears when define invalid regionEndpoint for registry operator
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.5.0
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-03 10:32 UTC by Wenjing Zheng
Modified: 2020-05-18 16:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-18 16:21:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Errors in registry operator log (18.69 KB, text/plain)
2020-02-03 10:33 UTC, Wenjing Zheng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 549 0 None closed WIP - Bug 1797512: Checking for RequestFailure return from AWS 2020-05-26 07:33:26 UTC
Github openshift cluster-image-registry-operator pull 555 0 None closed Bug 1797512: Reporting RequestFailure errors 2020-05-26 07:33:26 UTC

Description Wenjing Zheng 2020-02-03 10:32:22 UTC
Description of problem:
Below error appears if define regionEndpoint in image registry config as below:
http://xiuwang-proxy-bs8zt-image-registry-us-east-2-pfhumfbsjgsqvyrep.s3-website.us-east-2.amazonaws.com

Spec:
Status:
  Conditions:
    Last Transition Time:  2020-02-03T04:20:55Z
    Message:               The registry is ready
    Reason:                Ready
    Status:                True
    Type:                  Available
    Last Transition Time:  2020-02-03T10:20:02Z
    Message:               Unable to apply resources: unable to sync storage configuration: SerializationError: failed to unmarshal error message
                           status code: 404, request id: 5CE86E737B1E3007, host id: qYDQ/O6c/tGUkvFMG8i9R3WRiwODLCyup+DjlqxDj9+uU5U1A8UTocPD2JsnOHccXwIJCQHH6kc=
caused by: UnmarshalError: failed to unmarshal error message
  00000000  3c 68 74 6d 6c 3e 0a 3c  68 65 61 64 3e 3c 74 69  |<html>.<head><ti|
00000010  74 6c 65 3e 34 30 34 20  4e 6f 74 20 46 6f 75 6e  |tle>404 Not Foun|
00000020  64 3c 2f 74 69 74 6c 65  3e 3c 2f 68 65 61 64 3e  |d</title></head>|
00000030  0a 3c 62 6f 64 79 3e 0a  3c 68 31 3e 34 30 34 20  |.<body>.<h1>404 |
00000040  4e 6f 74 20 46 6f 75 6e  64 3c 2f 68 31 3e 0a 3c  |Not Found</h1>.<|
00000050  75 6c 3e 0a 3c 6c 69 3e  43 6f 64 65 3a 20 4e 6f  |ul>.<li>Code: No|
00000060  53 75 63 68 57 65 62 73  69 74 65 43 6f 6e 66 69  |SuchWebsiteConfi|
00000070  67 75 72 61 74 69 6f 6e  3c 2f 6c 69 3e 0a 3c 6c  |guration</li>.<l|
00000080  69 3e 4d 65 73 73 61 67  65 3a 20 54 68 65 20 73  |i>Message: The s|
00000090  70 65 63 69 66 69 65 64  20 62 75 63 6b 65 74 20  |pecified bucket |
000000a0  64 6f 65 73 20 6e 6f 74  20 68 61 76 65 20 61 20  |does not have a |
000000b0  77 65 62 73 69 74 65 20  63 6f 6e 66 69 67 75 72  |website configur|
000000c0  61 74 69 6f 6e 3c 2f 6c  69 3e 0a 3c 6c 69 3e 42  |ation</li>.<li>B|
000000d0  75 63 6b 65 74 4e 61 6d  65 3a 20 78 69 75 77 61  |ucketName: xiuwa|
000000e0  6e 67 2d 70 72 6f 78 79  2d 62 73 38 7a 74 2d 69  |ng-proxy-bs8zt-i|
000000f0  6d 61 67 65 2d 72 65 67  69 73 74 72 79 2d 75 73  |mage-registry-us|
00000100  2d 65 61 73 74 2d 32 2d  70 66 68 75 6d 66 62 73  |-east-2-pfhumfbs|
00000110  6a 67 73 71 76 79 72 65  70 3c 2f 6c 69 3e 0a 3c  |jgsqvyrep</li>.<|
00000120  6c 69 3e 52 65 71 75 65  73 74 49 64 3a 20 35 43  |li>RequestId: 5C|
00000130  45 38 36 45 37 33 37 42  31 45 33 30 30 37 3c 2f  |E86E737B1E3007</|
00000140  6c 69 3e 0a 3c 6c 69 3e  48 6f 73 74 49 64 3a 20  |li>.<li>HostId: |
00000150  71 59 44 51 2f 4f 36 63  2f 74 47 55 6b 76 46 4d  |qYDQ/O6c/tGUkvFM|
00000160  47 38 69 39 52 33 57 52  69 77 4f 44 4c 43 79 75  |G8i9R3WRiwODLCyu|
00000170  70 2b 44 6a 6c 71 78 44  6a 39 2b 75 55 35 55 31  |p+DjlqxDj9+uU5U1|
00000180  41 38 55 54 6f 63 50 44  32 4a 73 6e 4f 48 63 63  |A8UTocPD2JsnOHcc|
00000190  58 77 49 4a 43 51 48 48  36 6b 63 3d 3c 2f 6c 69  |XwIJCQHH6kc=</li|
000001a0  3e 0a 3c 2f 75 6c 3e 0a  3c 68 72 2f 3e 0a 3c 2f  |>.</ul>.<hr/>.</|
000001b0  62 6f 64 79 3e 0a 3c 2f  68 74 6d 6c 3e 0a        |body>.</html>.|

caused by: expected element type <Error> but have <html>
    Reason:                Error
    Status:                True
    Type:                  Progressing
    Last Transition Time:  2020-02-03T04:10:17Z
    Status:                False
    Type:                  Degraded
  Extension:               <nil>


Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-02-225006

How reproducible:
Always

Steps to Reproduce:
1.Add regionEndpoint in image registry config as below:
http://xiuwang-proxy-bs8zt-image-registry-us-east-2-pfhumfbsjgsqvyrep.s3-website.us-east-2.amazonaws.com
2.Describe image-registry cluster operator
3.

Actual results:
UnmarshalError appears.

Expected results:
Should have clear error with good format.

Additional info:

Comment 1 Wenjing Zheng 2020-02-03 10:33:30 UTC
Created attachment 1657323 [details]
Errors in registry operator log

Comment 2 Oleg Bulatov 2020-02-03 10:52:51 UTC
It's unclear how the operator can distinguish between a (temporarily) broken custom region and a typo. This behaviour exists since 4.0, so it's not a blocker for 4.4.

Comment 3 Oleg Bulatov 2020-02-04 17:06:34 UTC
Lowering the severity because it's an enhancement of error reporting.

Comment 4 Ricardo Maraschini 2020-05-18 16:21:39 UTC
An initial attempt was made on improving error messaging here but as insights operator collects conditions with messages(it doesn't collect logs) it is better to keep more information in the condition. Closing this as NOTABUG.


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