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
This commit is contained in:
Nick Craig-Wood 2022-11-29 15:41:46 +00:00
parent f746b2fe85
commit 914fbe242c

View file

@ -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
}
}
}