-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LeaseIDMissing error even though LeaseID is present #230
Comments
anyone monitoring this repo? |
I have fixed it - heres the diff:
|
The lease access conditions in the copier struct are not propagated to the StageBlock call. I made this change and now the LeaseId error no longer occurs and all is good. I would really appreciate if a release 0.11.1 could be made ASAP with this fix |
Hey @eccles , I appreciate your contribution. We'll try to include it in the next release. |
Thanks for the release - however the tagging has gone awry - I change my go.mod file to: github.com/Azure/azure-storage-blob-go v0.12.0 and inspection of my go cache: vi /opt/go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.12.0/azblob/chunkwriting.go shows the change has not been applied. 187 _, err := c.to.StageBlock(c.ctx, chunk.id, bytes.NewReader(chunk.buffer), LeaseAccessConditions{}, nil, c.o.ClientProvidedKeyOptions) If I pull repo directly using git clone and inspect that all looks good: paul@paul-Precision-7530:~/git/azure-storage-blob-go$ git log
commit 559b75b (origin/dev)
commit 0c35e97
and the fix is in: 186 _, err := c.to.StageBlock(c.ctx, chunk.id, bytes.NewReader(chunk.buffer), c.o.AccessConditions.LeaseAccessConditions, nil, c.o.ClientProvidedKeyOptions) |
Which version of the SDK was used?
0.10.0 and 0.11.0
Which platform are you using? (ex: Windows, Linux, Debian)
Linux
What problem was encountered?
LeaseIDMissing error even though LeaseID is present. Code worked previously on 0.8.0
How can we reproduce the problem in the simplest way?
Example code that is failing:
Have you found a mitigation/solution?
No
Other Info (Log output):
DEBUG azblob/storer.go:348 WriteWithLease: accessConditions {{0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC } {4a66fbe7-053a-4c66-ba12-81ac039347a8}}
INFO azblob/storer.go:360 WriteWithLease cannot upload blobs: write error: -> github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /opt/go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.11.0/azblob/zc_storage_error.go:42
===== RESPONSE ERROR (ServiceCode=LeaseIdMissing) =====
Description=There is currently a lease on the blob and no lease ID was specified in the request.
RequestId:5a264520-d01e-0018-6774-beb83f000000
Time:2020-11-19T13:01:47.8449028Z, Details:
Code: LeaseIdMissing
PUT https://xxxxxxxxxxxxxxxxxxxxxx.blob.core.windows.net/dlt/yyyyy?blockid=g1zcpLIGR2GdQ0gAXkScDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA%3D%3D&comp=block&timeout=31
Authorization: REDACTED
Content-Length: [73]
User-Agent: [Azure-Storage/0.11 (go1.14.8; linux)]
X-Ms-Client-Request-Id: [1a06b262-8072-4545-631c-addda4e9290c]
X-Ms-Date: [Thu, 19 Nov 2020 13:01:47 GMT]
X-Ms-Version: [2019-12-12]
--------------------------------------------------------------------------------
RESPONSE Status: 412 There is currently a lease on the blob and no lease ID was specified in the request.
Content-Length: [267]
Content-Type: [application/xml]
Date: [Thu, 19 Nov 2020 13:01:47 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Client-Request-Id: [1a06b262-8072-4545-631c-addda4e9290c]
X-Ms-Error-Code: [LeaseIdMissing]
X-Ms-Request-Id: [5a264520-d01e-0018-6774-beb83f000000]
X-Ms-Version: [2019-12-12]
The text was updated successfully, but these errors were encountered: