Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1784208

Summary: operator uses virtual hosted bucket addressing for custom region endpoints
Product: OpenShift Container Platform Reporter: Oleg Bulatov <obulatov>
Component: Image RegistryAssignee: Oleg Bulatov <obulatov>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1.zCC: adam.kaplan, aos-bugs, dahernan, hgomes, wewang, wzheng
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: the operator always uses virtual hosted style addressing for S3 even if a custom region endpoint is provided Consequence: it's not compatible with the registry that uses path style addressing for custom endpoints Fix: when a custom endpoint is provided, use path style addressing Result: the operator access the S3-compatible storage that same way as the registry does
Story Points: ---
Clone Of:
: 1815124 (view as bug list) Environment:
Last Closed: 2020-05-04 11:20:19 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: 1815124    

Description Oleg Bulatov 2019-12-16 23:41:46 UTC
Description of problem:

The image registry operator, when S3 regionEndpoint is specified, tries to use virtual hosted bucket addressing like http://<bucketname>.<regionEndpoint>/<key>. This is not desired behaviour for S3-compatible storages like Minio.

Version-Release number of selected component (if applicable):

4.1.0

How reproducible:


Steps to Reproduce:
1. install an OpenShift cluster and minio storage
2. change the config.imageregistry to use this storage, set the proper regionEndpoint

Actual results:

The operator includes the bucket name into the domain name.

Expected results:

The operator uses path-style addressing like http://<regionEndpoint>/<bucket>/<key>.

Comment 5 Wenjing Zheng 2020-02-03 10:35:05 UTC
But if use http://<bucketname>.<regionEndpoint>/<key>,UnmarshalError appears, so report a bug as below: https://bugzilla.redhat.com/show_bug.cgi?id=1797512

Comment 7 Wenjing Zheng 2020-03-30 09:57:32 UTC
Re-verify on 4.4.0-0.nightly-2020-03-29-132004:
  storage:
    s3:
      bucket: wzheng-44bug-bcwqr-image-registry-us-east-2-yfjbspjvnpcuouygwi
      encrypt: true
      keyID: ""
      region: us-east-2
      regionEndpoint: https://s3.us-east-2.amazonaws.com/

Comment 9 errata-xmlrpc 2020-05-04 11:20:19 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, 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/RHBA-2020:0581