Bug 1870513 - GCS driver does not create user provided bucket
Summary: GCS driver does not create user provided bucket
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-20 09:19 UTC by Ricardo Maraschini
Modified: 2020-10-27 16:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Operator does not create bucket manually provided by the user. Consequence: Operator remains in Progressing. Fix: By correctly validating GCS api return we can now identify the specific error related to a non-existing bucket. Based on the error proper identification we can now create the bucket. Result: User can now provide a bucket name and if it does not exist Operator will create it.
Clone Of:
Environment:
Last Closed: 2020-10-27 16:29:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 589 0 None closed Bug 1870513: Fix wrong usage of ErrBucketNotExist 2020-10-15 20:36:10 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:30:02 UTC

Description Ricardo Maraschini 2020-08-20 09:19:58 UTC
Description of problem:

GCP should (as Azure driver does) create the bucket provided by user if it does not exist. What is happening is that if user manually provides a bucket name the driver does not create it and the operator remains in Progressing.


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

4.5.7

How reproducible:

Always

Steps to Reproduce:
1. Edit the image registry operator config
2. Change the bucket name (spec.storage.gcs.bucket) to a random name

Actual results:

Operator remains in Progressing with the following condition:

$ oc get -o json configs.imageregistry.operator.openshift.io/cluster | jq
...
  {
    "lastTransitionTime": "2020-08-20T09:12:37Z",
    "message": "storage: bucket doesn't exist",
    "reason": "Unknown Error Occurred",
    "status": "Unknown",
    "type": "StorageExists"
  },
...
  {
    "lastTransitionTime": "2020-08-20T09:12:37Z",
    "message": "Unable to apply resources: unable to sync storage configuration: storage: bucket doesn't exist",
    "reason": "Error",
    "status": "True",
    "type": "Progressing"
  },
..

Expected results:

Supplied bucket is created and the container leaves the Progressing.


Additional info:

Comment 3 Wenjing Zheng 2020-08-26 03:33:54 UTC
Verified on 4.6.0-0.nightly-2020-08-25-222652, gcs.bucket can be changed to random one:
 storage:
    gcs:
      bucket: wzheng-test-gcs
      projectID: openshift-qe
      region: us-central1

Comment 5 errata-xmlrpc 2020-10-27 16:29:46 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 (OpenShift Container Platform 4.6 GA Images), 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:4196


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