Description of problem: Report 409 error for azure storage container after remove spec.stroage.azure.container from imageregistry crd. Version-Release number of selected component (if applicable): 4.2.0-0.nightly-2019-07-28-222114 How reproducible: always Steps to Reproduce: 1.Setup a ipi-azure cluster 2.Remove spec.stroage.azure.container from imageregistry crd 3.Watch image-registry clusteroperator and crd. Actual results: Container is added back with an empty value and crd report 409 error. $ oc describe config.imageregistry Name: cluster Namespace: Labels: <none> Annotations: <none> API Version: imageregistry.operator.openshift.io/v1 Kind: Config Metadata: Creation Timestamp: 2019-07-29T05:57:50Z Finalizers: imageregistry.operator.openshift.io/finalizer Generation: 3 Resource Version: 30533 Self Link: /apis/imageregistry.operator.openshift.io/v1/configs/cluster UID: cc72db31-b1c5-11e9-9beb-000d3a94a1ba Spec: Default Route: false Http Secret: 1456f869ea210b3b8185d21c2aba618631ef9ed0ad5905144abc4f290197d511652206fb1c986ebd1c38dbae28a463f27bf8bc4e5ed6a1826c63a12d7a7686cc Logging: 2 Management State: Managed Proxy: Http: Https: No Proxy: Read Only: false Replicas: 1 Requests: Read: Max In Queue: 0 Max Running: 0 Max Wait In Queue: 0s Write: Max In Queue: 0 Max Running: 0 Max Wait In Queue: 0s Storage: Azure: Account Name: zhsun3gzhhs2p2zv Status: Conditions: Last Transition Time: 2019-07-29T06:51:56Z Message: Unable to create storage container: -> github.com/openshift/cluster-image-registry-operator/vendor/github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /go/src/github.com/openshift/cluster-image-registry-operator/vendor/github.com/Azure/azure-storage-blob-go/azblob/zc_storage_error.go:42 ===== RESPONSE ERROR (ServiceCode=ContainerAlreadyExists) ===== Description=The specified container already exists. RequestId:a64ef3a8-f01e-013b-35da-45f51d000000 Time:2019-07-29T06:51:56.1779854Z, Details: Code: ContainerAlreadyExists PUT https://zhsun3gzhhs2p2zv.blob.core.windows.net/image-registry?restype=container&timeout=61 Authorization: REDACTED User-Agent: [openshift.io cluster-image-registry-operator/v4.2.0-201907281300-dirty Azure-Storage/0.7 (go1.11.6; linux)] X-Ms-Client-Request-Id: [ce363f4c-fe26-4f13-5b4e-095aaf6aa1ef] X-Ms-Date: [Mon, 29 Jul 2019 06:51:56 GMT] X-Ms-Version: [2018-11-09] -------------------------------------------------------------------------------- RESPONSE Status: 409 The specified container already exists. Content-Length: [230] Content-Type: [application/xml] Date: [Mon, 29 Jul 2019 06:51:55 GMT] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] X-Ms-Error-Code: [ContainerAlreadyExists] X-Ms-Request-Id: [a64ef3a8-f01e-013b-35da-45f51d000000] X-Ms-Version: [2018-11-09] Reason: AzureError Status: Unknown Type: StorageExists Last Transition Time: 2019-07-29T06:04:48Z Message: The registry is ready Reason: Ready Status: True Type: Available Last Transition Time: 2019-07-29T06:45:29Z Message: Unable to apply resources: unable to sync storage configuration: unable to create storage container: -> github.com/openshift/cluster-image-registry-operator/vendor/github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /go/src/github.com/openshift/cluster-image-registry-operator/vendor/github.com/Azure/azure-storage-blob-go/azblob/zc_storage_error.go:42 ===== RESPONSE ERROR (ServiceCode=ContainerAlreadyExists) ===== Description=The specified container already exists. RequestId:a64ef3a8-f01e-013b-35da-45f51d000000 Time:2019-07-29T06:51:56.1779854Z, Details: Code: ContainerAlreadyExists PUT https://zhsun3gzhhs2p2zv.blob.core.windows.net/image-registry?restype=container&timeout=61 Authorization: REDACTED User-Agent: [openshift.io cluster-image-registry-operator/v4.2.0-201907281300-dirty Azure-Storage/0.7 (go1.11.6; linux)] X-Ms-Client-Request-Id: [ce363f4c-fe26-4f13-5b4e-095aaf6aa1ef] X-Ms-Date: [Mon, 29 Jul 2019 06:51:56 GMT] X-Ms-Version: [2018-11-09] -------------------------------------------------------------------------------- RESPONSE Status: 409 The specified container already exists. Content-Length: [230] Content-Type: [application/xml] Date: [Mon, 29 Jul 2019 06:51:55 GMT] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] X-Ms-Error-Code: [ContainerAlreadyExists] X-Ms-Request-Id: [a64ef3a8-f01e-013b-35da-45f51d000000] X-Ms-Version: [2018-11-09] Reason: Error Status: True Type: Progressing Last Transition Time: 2019-07-29T06:01:23Z Status: False Type: Degraded Last Transition Time: 2019-07-29T06:01:23Z Status: False Type: Removed Observed Generation: 3 Ready Replicas: 0 Storage: Azure: Account Name: zhsun3gzhhs2p2zv Container: Storage Managed: true Events: <none> Expected results: Shouldn't prompt this error. Additional info: Met same error when add wrong parameter "containerName".
Looks like we just were not retrying on the correct error code / service code, submitted pull request to fix it. https://github.com/openshift/cluster-image-registry-operator/pull/334
The issue still could be reproduce with same error message in 4.2.0-0.nightly-2019-08-01-035705 version(which has include the fix).
Ok, it looks like the container name is static in the create code (image-registry), so let me work out what the flow should be and i'll throw together another pr.
The new pull request has merged, please check it again.
@Corey After remove spec.stroage.azure.container from imageregistry config, the container will be added back without error. Check with 4.2.0-0.nightly-2019-08-09-000333 payload Please set it on_qa, so I can verify it.
Mark this as verified as comment #6.
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-2019:2922