Unable to delete a resource group without reset slot config

Dushyant Priyadarshee 121 Reputation points
2020-08-03T14:13:20.363+00:00

Hello,

This is an intermittent issue.

In our dev environment, we create and delete resource groups regularly.
If we have a resource group with an app service plan, function app and a function app staging slot, then on random days we are unable to delete that resource group.
It doesn't throw any error, just starts and never reaches 'Succeeded' state on the activity log. Check the screenshot below.

15097-image.png

It can just sit like that for hours.
My team has been hitting this issue intermittently for the last few months.

Workaround/solution?
The only way we can delete it is by resetting the slot config of the staging slot first. We reset it using Azure Resources Explorer (http://resources.azure.com/). After the reset, the resource group can be deleted.

Do you know why this reset allows the resource group to be deleted?
Does updating slot configuration cause some kind of lock and reset releases it?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,248 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,865 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Grmacjon-MSFT 15,856 Reputation points
    2020-08-04T02:22:59.613+00:00

    Hello @dushyantp,

    This is definitely strange behavior. Do you face the same behavior when using PowerShell or Azure CLI to remove the RG? two things you could look into

    1. Double-check to see if there are any ‘Locks” added to your App Service Plan and RG.
    2. If there are any existing apps and configured with multiple slots, ensure that the slots are deleted prior to deleting the apps/RG.

    As for why the resets allows the resource group to be deleted, I will reach out to the engineering team and get back to you.

    Thanks,

    Grace

    0 comments No comments

  2. Dushyant Priyadarshee 121 Reputation points
    2020-08-04T14:47:34.283+00:00

    Hi @Grmacjon-MSFT ,

    Thank you for your response.

    As this issue is intermittent, the following answers are based on the last two times I have seen this.

    Do you face the same behaviour when using PowerShell or Azure CLI to remove the RG?
    Yes same issue with both CLI and PS. The delete starts but never ends. Both the times the (desktop not pscore) PowerShell prompt just sat there doing nothing. Hitting Ctrl+C also did not end the process. Had to close the windows terminal tab.

    Double-check to see if there are any ‘Locks” added to your App Service Plan and RG.
    There were no locks present at all. I did not remove any locks before deleting after 'resetting the slot configuration'.

    If there are any existing apps and configured with multiple slots, ensure that the slots are deleted prior to deleting the apps/RG.
    In both the cases I have seen this recently, there was only one app service plan, one function app and a staging slot for that app. I could not delete any of these resources in any order until the slot configuration reset, possibly because I had triggered resource group deletion first and it would not finish. After the reset, I deleted staging slot, then app and then app service plan. Didn't try any other combination.

    Hope this helps. Either way, if the engineering team can explain why the workaround works, it would be useful as well.


  3. Grmacjon-MSFT 15,856 Reputation points
    2020-10-01T21:56:46.35+00:00

    Thanks for the update @dushyantp! It looks like one of our support engineers were able to help resolve your issue. Sharing on here how the issue was resolved so that it can help the rest of the community.

    After further investigating this issue internally, it was confirmed that this behavior was present in the App service version < 89. There was an issue related to slot deletion failure in Azure App Service Version equal to 89.x.x.x. However, a fix was deployed that resolved the issue.

    Thanks again for using Azure.

    Best,
    Grace

    0 comments No comments