Skip to content

Commit dc19aa4

Browse files
Merge pull request #1129 from flavianmissi/OCPBUGS-42732
OCPBUGS-42732: pkg/storage/azure: also check for auth failure error code on deletion
2 parents 8c08b64 + 0ea39ad commit dc19aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/storage/azure/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ func (d *driver) removeStorageContainerViaTrack2SDK(cr *imageregistryv1.Config,
11421142
}
11431143
err = blobClient.DeleteStorageContainer(d.Context, d.Config.Container)
11441144
if err != nil {
1145-
if bloberror.HasCode(err, bloberror.AuthorizationPermissionMismatch) {
1145+
if bloberror.HasCode(err, bloberror.AuthorizationPermissionMismatch) || bloberror.HasCode(err, bloberror.AuthorizationFailure) {
11461146
util.UpdateCondition(cr, defaults.StorageExists, operatorapiv1.ConditionUnknown, storageExistsReasonAzureError, fmt.Sprintf("Unable to delete storage container due to delete container permission missing, trying account deletion: %s", err))
11471147
return false, nil
11481148
} else if bloberror.HasCode(err, "AccountNotFound") {

0 commit comments

Comments
 (0)