Bug 1838977

Summary: No virtualHostedStyle option when upgrade from 4.4 to 4.5
Product: OpenShift Container Platform Reporter: Wenjing Zheng <wzheng>
Component: Image RegistryAssignee: Oleg Bulatov <obulatov>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, obulatov
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:41:00 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:
Attachments:
Description Flags
Image registry operator log none

Description Wenjing Zheng 2020-05-22 08:36:47 UTC
Description of problem:
There is no "virtualHostedStyle" option when cluster is upgrade from 4.4 to 4.5 latest nightly build.

Version-Release number of selected component (if applicable):
4.4.5->4.5.0-0.nightly-2020-05-22-011031

How reproducible:
Always

Steps to Reproduce:
1.Start a 4.4.z stable build 
2.Define regionEndpoint or not - optional
  storage:
    s3:
      bucket: wzhengup-cvzds-image-registry-us-east-2-xmodaxmojupwsiyqwnanwr
      encrypt: true
      region: us-east-2
      regionEndpoint: https://s3.us-east-2.amazonaws.com/
3.Upgrade to 4.5 latest nightly build

Actual results:
There is no option virtualHostedStyle  after upgrade.

Expected results:
There should be an option virtualHostedStyle  to indicate true/false


Additional info:

Comment 1 Wenjing Zheng 2020-05-22 08:40:09 UTC
Created attachment 1690989 [details]
Image registry operator log

Comment 2 Oleg Bulatov 2020-05-22 15:48:11 UTC
This parameter works only when regionEndpoint is set. When it's unset, virtualHostedStyle should have the backward compatible value, i.e. "false".

If someone has a script that patches regionEndpoint after the installer finishes its job, "false" won't break this script. "true" will break this script, i.e. the default "true" it's not backward compatible.

I'm going to update the default to be "false". Thanks for catching this.

Comment 5 Wenjing Zheng 2020-05-27 06:08:03 UTC
I can see below env var by accessing pod env list, but still no option in configs.imageregistry exposed by default after upgrade: 
$ oc set env pods/image-registry-564d4fdb7b-6vtkk --list | grep REGISTRY_STORAGE_S3_VIRTUALHOSTEDSTYLE
REGISTRY_STORAGE_S3_VIRTUALHOSTEDSTYLE=false

Whether the option "virtualHostedStyle" should display after upgrade in configs.imageregistry?

Comment 6 Oleg Bulatov 2020-05-27 09:15:10 UTC
No, it shouldn't. No value and false have the exact same meaning.

Comment 7 Wenjing Zheng 2020-05-27 10:01:05 UTC
OK, thanks, then this bug can be verified now.

Comment 8 errata-xmlrpc 2020-07-13 17:41:00 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:2409