Batch account deleting forever

James Wilkinson 40 Reputation points Microsoft Employee

Tried to delete a batch account last week and it is stuck in a Deleting state.

  1. Ankit Yadav 14,455 Reputation points Microsoft External Staff Moderator

    Hey @James Wilkinson

    Thank you for reaching out. We understand that the Batch account not being deleted for over a week is concerning.

    We are currently investigating this issue in detail. In the meantime, there are some documented reasons that can prevent an Azure Batch account from being deleted. Please review the following article to see if any of these scenarios apply to your case: https://learn.microsoft.com/en-us/troubleshoot/azure/hpc/batch/azure-batch-pool-deletion-failure

    In case, if you have already gone through it and it didn't help to resolve the issue for you, could you, please try deleting the Batch account using the Azure CLI and let us know if this works:

    az batch account delete --name <batch-account-name> \
     --resource-group <resource-group-name> \
     [--no-wait] \
     [--yes]
    

    For reference, you can find more details about this command here: https://learn.microsoft.com/en-us/cli/azure/batch/account?view=azure-cli-latest#az-batch-account-delete

    Additionally, I've reached out to you via Private Message requesting some details related to your subscription to ensure your privacy is protected. Please check your messages and let me know if you have any questions or need further clarification.


Sign in to comment

Answer accepted by question author

Himanshu Shekhar 6,710 Reputation points Microsoft External Staff Moderator

@James Wilkinson

The Azure Batch account became stuck in a "Deleting" state due to a dependency conflict involving a subnet that was still showing active usage. Specifically, this prevented the deletion of the underlying Batch Pool, which in turn blocked the overall Batch account deletion process and caused it to remain stuck in the Deleting state for an extended period.

The product team identified the specific blocking networking resources causing the issue. We then requested the customer to delete these resources (including resolving the subnet usage), which allowed the deletion workflow to proceed successfully. The Batch Pool was removed, and the Azure Batch account was fully deleted.

The product team has flagged this as a repair item. They plan to improve the Azure Portal by surfacing these types of deletion failures more prominently, so customers can easily identify conflicting resources like subnets with lingering usage and resolve them without extended delays.

0 comments No comments

Sign in to comment

1 additional answer

  1. AI answer

    If your Azure Batch account is stuck in a "Deleting" state, it could be due to resource locks on the resource group or the batch account itself. Here are steps you can take to resolve this issue:

    1. Check for Resource Locks: Verify if there are any resource locks applied to the batch account or its resource group. Resource locks can prevent deletion operations from completing.
      • If a lock is present, you will need to remove it before attempting to delete the batch account again.
    2. Wait for Completion: Sometimes, the deletion process may take longer than expected. If there are no locks, allow some time for the operation to complete, as it may take several minutes.
    3. Review Activity Logs: Check the activity logs for any error messages that might indicate why the deletion is stuck. This can provide insights into any underlying issues.

    If the problem persists after checking these factors, you may need to contact Azure support for further assistance.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.
Sign in to answer

Your answer