From 914fbe242cc16ac5d33ede115f750f5b871f0280 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 29 Nov 2022 15:41:46 +0000 Subject: [PATCH] azureblob: ignore AuthorizationFailure when trying to create a create a container If we get AuthorizationFailure when trying to create a container, then assume the container has already been created --- backend/azureblob/azureblob.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go index 3631474e5..b3a20fc7f 100644 --- a/backend/azureblob/azureblob.go +++ b/backend/azureblob/azureblob.go @@ -1222,6 +1222,11 @@ func (f *Fs) makeContainer(ctx context.Context, container string) error { time.Sleep(6 * time.Second) // default 10 retries will be 60 seconds f.cache.MarkDeleted(container) return true, err + case bloberror.AuthorizationFailure: + // Assume that the user does not have permission to + // create the container and carry on anyway. + fs.Debugf(f, "Tried to create container but got %s error - carrying on assuming container exists", storageErr.ErrorCode) + return false, nil } } }