Bug 1827807

Summary: image registry operator keeps creating new storage accounts on Azure
Product: OpenShift Container Platform Reporter: Jim Minter <jminter>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: aos-bugs, rmarasch, scuppett
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Having an azure infrastructure name containing uppercase letters. Consequence: Azure containers and storage accounts are named using infrastructure name, in some circumstances the auto generated name (containing the infrastructure name) would be valid for a storage account but not for a container, making the operator to create the first but fail on the latter and forcing a retry. Fix: Adjusted the container name creation logic to discard invalid characters. Result: Image registry is correctly deployed on an infrastructure that contain invalid characters on its name.
Story Points: ---
Clone Of:
: 1832140 (view as bug list) Environment:
Last Closed: 2020-07-13 17:31:30 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: 1832140    

Description Jim Minter 2020-04-24 20:40:30 UTC
On 4.3.13 in Azure (IPI), if the infrastructure ID of the cluster contains capital letters, image registry operator creates a storage account, but then fails to create a storage container inside because it uses the infrastructure ID in the name and Azure does not permit capital letters in the name.

The backoff behaviour is then horrible.  Having failed to create a storage container, it then keeps retrying, creating new storage *accounts* until the end user's storage account quota is exhausted.

An ARO bug caused us to set the infrastructure ID in capital letters.  I don't know if the standard installer or UPI make it feasible to do this -- if so, it would be good to fix the backoff behaviour.

Comment 1 Stephen Cuppett 2020-04-24 20:50:36 UTC
Setting target release to current development version (4.5) for investigation. Where fixes (if any) are required/requested for prior versions, cloned BZs will be created when appropriate.

Comment 5 Wenjing Zheng 2020-05-26 08:07:32 UTC
Image registry not allow capital letter in bucket name now on 4.5.0-0.nightly-2020-05-25-232952: 
# configs.imageregistry.operator.openshift.io "cluster" was not valid:
# * spec.storage.azure.container: Invalid value: "": spec.storage.azure.container in body should match '^[0-9a-z]+(-[0-9a-z]+)*$'

Comment 6 errata-xmlrpc 2020-07-13 17:31:30 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