question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Copy blob from an archived blob results in error

See original GitHub issue

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the Azurite was used?

3.14.3

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What’s the Node.js version?

v14.17.3

What problem was encountered?

Copying from an archived blob to an online blob results in error.

Steps to reproduce the issue?

Create a block blob in azurite. Archive it. Copy it to an online blob using the copy blob API. https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob

We used the node sdk to perform the request, and here is the details of the request (excluding irrelevant headers) and the response:

Request:

{
    "url": "http://127.0.0.1:10000/devstoreaccount1/create1/0.log",
    "method": "PUT",
    "headers": {
        "_headersMap": {
            "x-ms-version": {
                "name": "x-ms-version",
                "value": "2019-07-07"
            },
            "accept": {
                "name": "accept",
                "value": "application/xml"
            },
            "x-ms-access-tier": {
                "name": "x-ms-access-tier",
                "value": "Hot"
            },
            "x-ms-rehydrate-priority": {
                "name": "x-ms-rehydrate-priority",
                "value": "Standard"
            },
            "x-ms-copy-source": {
                "name": "x-ms-copy-source",
                "value": "http://127.0.0.1:10000/devstoreaccount1/create1/06a0ff37-6a6b-ba4c-77c0-b61d89211738.log"
            },
            "authorization": {
                "name": "Authorization",
                "value": "SharedKey (signed using the default dev key)
            }
        }
    }
}

Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Error>\n  <Code>BlobArchived</Code>\n  <Message>This operation is not permitted on an archived blob.\nRequestId:6240b810-4842-4424-af89-0b38c3b2741d\nTime:2021-11-01T20:32:11.369Z</Message>\n</Error>

Have you found a mitigation/solution?

No.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JasonYeMSFTcommented, Nov 3, 2021

I go to node_modules and added the patched code there. I was incorrectly using a globally installed azurite so the patch didn’t work. Thanks for the fix.

0reactions
bluewwcommented, Nov 3, 2021

@JasonYeMSFT

Not sure how you change the script, but the fix is in Azurite code.

From the debug log, we see the related request is “Blob_StartCopyFromURL”, so the current fix should can resolve this issue. We will target to release the fix in the next Azurite release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure: Unable to copy Archive blobs from one storage account ...
Whenever I try to copy Archive blobs to a different storage account and changing its tier in destination. I am getting the following...
Read more >
Blob rehydration from the Archive tier | Microsoft Learn
You can rehydrate a blob either by copying it from the Archive tier to an online tier, or by changing its tier from...
Read more >
This operation is not permitted on an archived blob
According to the Azure documentation: While a blob is in archive storage, the blob data is offline and can't be read, copied, overwritten,...
Read more >
Azure Blob Storage with Archived files cannot be updated #4735
Using Rclone with Azure Blob Storage, when you try to update a file which is in archived state, I get the following error:....
Read more >
How to use Azure Archive Blob Storage for long-term data ...
Long-term data retention is a hard problem to solve for multiple reasons. First, it is a real challenge to find a cost-effective storage...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found