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.

Can't list blob information when a blob is leased

See original GitHub issue

Describe the bug I want to check whether a blob is leased so I execute command below:

az storage blob show --account-name xxx -c xxx --name xxx --query 'properties.lease.status' -otsv

It only works when a blob’s lease status is unlocked.

If I try to show a blob which lease status is leased, it will get stuck until it reaches the timeout limit.

To Reproduce Run the command above on two blobs. One lease status is unlocked, another is leased.

Expected behavior When I execute the command, a leased blob can show its lease status.

Environment summary

  • macOS Monterey 12.2.1
  • Azure CLI 2.20.0

Additional context None

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
navba-MSFTcommented, Mar 30, 2022

@LoofahBu Thanks for reaching out to us. I was able to run the below command and get the lease status of leased blob. see below:

image

az storage blob show --account-name MystorageName -c MyContainer --name StormEvents.csv --query ‘properties.lease.status’ -o tsv

Output: locked

I am using the most recent version of Azure CLI. Could you please install the most recent version of Azure CLi and test again ? Awaiting your reply.

0reactions
navba-MSFTcommented, Mar 31, 2022

@LoofahBu Thanks for getting back. We will now proceed with closure of this github issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lease Blob (REST API) - Azure Storage | Microsoft Learn
The Lease Blob operation creates and manages a lock on a blob for write and delete operations.
Read more >
Cannot delete blob: There is currently a lease on the blob and ...
You need to delete the disks from the Virtual Machines section of the portal. Navigate to Virtual Machines -> Disks; Delete the disks....
Read more >
Cannot delete blob There is currently a lease on the ... - Edureka
When I attempt to delete a blob from my storage account container, I get an error message, "There is currently a lease on...
Read more >
What is the use of Azure Blob Leases? - YouTube
Azure Blob leases are used to acquire and release locks over blobs in storage account. This helps preventing data inconsistency while ...
Read more >
Cheat Sheet: Microsoft Azure Blob Storage - Zuar
Simply navigate to the subscription and storage account then right-click 'Blob Containers' and select 'Create Blob Container' and name it.
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