ARO cluster fails to be deleted with a generic event "Internal Server Error"

Solution Verified - Updated -

Environment

  • Azure Red Hat OpenShift [ARO]
    • 4.x

Issue

  • I am trying to delete my ARO cluster which is failing with Internal Server Error and no further details are provided.

Resolution

Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.

  • Look for any Azure resources/services that may be linked to the cluster as ARO may not be able to discover these and/or may not be authorized to remove/detach them prior to deleting the cluster. For example, Azure Private Link service which may be linked to the ARO load balancers.

Root Cause

  • The error generated by the Azure CLI is considered generic and may be related not only to one reason, which means it should be analyzed individually in order to find the root cause.

  • However, one possible cause for this event to occur is when you have an Azure Private Link service linked to the load balancer which prevents the load balancer to be removed.

Diagnostic Steps

  • By using the Azure CLI and running az aro delete, the cluster cannot be deleted and gives you an “Internal Server Error” event, as below:
$ az aro delete --resource-group $RESOURCEGROUP --name $CLUSTER
cli.azure.cli.core.azclierror: (InternalServerError) Internal server error.
Code: InternalServerError
Message: Internal server error.
az_command_data_logger: (InternalServerError) Internal server error.
Code: InternalServerError
Message: Internal server error.
  • Try by looking into the the activity logs in the Azure Portal, and search for an event like the one below:
features.ResourcesClient#DeleteByID: Failure sending request: StatusCode=400 -- Original Error: Code="CannotDeleteLoadBalancerWithPrivateLinkService" Message="Cannot delete load balancer /subscriptions/<subscription>/resourceGroups/<resourceGroup>/providers/Microsoft.Network/loadBalancers/<loadBalancer> since it is referenced by private link service /subscriptions/<subscription>/resourceGroups/<resourceGroup>/providers/Microsoft.Network/privateLinkServices/<privateLinkService>. Please delete private link service prior to deleting load balancer." Details=[]
  • If the event above cannot be found and you believe that the Azure Private Link service is not the cause, please contact Red Hat Support for further troubleshooting.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments