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.

Doesn't work when trying to acquire a lease with Azure function core tool

See original GitHub issue

Hi there,

I have an Azure durable function running locally through Azure core function tools. The main entry function is running fine, but it has problem of triggering a orchestration function through orchestration client. From the container log, I can see requests to PUT /devstoreaccount1/myfunc-leases/default/myfunc-control-00?comp=lease failed with 400 error. It seems to have problem with x-ms-proposed-lease-id.

Is there anyway I can see the full request in log?

I have no problem of running this against a real storage account.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kylepopecommented, Oct 9, 2018

@XiaoningLiu Thanks for the response – that’s news to me but good to hear! Just curious – any clues what a ballpark timeline on a preliminary implementation of the new architecture? The whole lease handing described in the docs is definitely complicated so I’m sure it’ll take time to get that right.

A few more details on things I looked into with my use-case described above:

  • I believe MD5 hash error is due to the fact that the GetBlob implementation will calculate the hash from the the raw blob from disk to the response body. I thought I might be able to remove new lease properties I added to the persisted blob prior to hash generation (and add them to response headers instead for example), but I think this would require a bigger change and I’m not sure what the ramifications might be.
  • I was specifically looking in general in the code for how some pieces of blob data are converted from raw blob properties to response headers, like lease state (which should be a “x-ms-lease-state” header in a get blob response), but it looks like we’re not doing that in a general way right now.
  • I also tried to adding a function to lib/core/env.js to generate a new ID for lease information to perhaps store that separately (e.g. prefix with a “D” character, following what was done for block ID and snapshot ID) and then making the assignment to request.id specifically for lease operations. However, this doesn’t end up working because some of that information needs to be saved as part of the blob I think (I ran into more different errors). I’m sure I’d need to make changes to other pieces of the implementation, but I’d need to figure out which.

Anyway, I’m pretty much out of free cycles at the moment. That said, I’d love to hear more about your future plans.

1reaction
XiaoningLiucommented, Oct 10, 2018

@kylepope thanks for the detailed investigation. Sorry for the late response, I’m quite busy these weeks.

We are working on a new architecture of Azurite, lease is an important part in the implementation. For current Azurite implementation, @edwin-huber any quick thoughs?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions failed to acquire host lock lease
The issue is that One of the request inputs is out of range. The function might be trying to access a non-existent (or...
Read more >
Listener for Azure function was unable to start error while ...
I have one Azure function app and I am trying to run that locally but getting the below error. I have the storage...
Read more >
Guidance for developing Azure Functions | Microsoft Learn
Learn the Azure Functions concepts and techniques that you need to develop functions in Azure, across all programming languages and ...
Read more >
Develop Azure Functions using Visual Studio | Microsoft Learn
Learn how to develop and test Azure Functions by using Azure Functions Tools for Visual Studio 2022.
Read more >
How to use the WebJobs SDK - Azure App Service
Azure Functions lets you customize host behavior through settings in the host.json file. Those settings are strings, not code, and use of these ......
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