ROSA cluster deletion stuck due to the dependency created by a user on AWS

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Service on AWS (ROSA)

Issue

  • ROSA cluster cannot be deleted because cluster resources have dependencies on other AWS resources created manually.
  • Cluster stuck in deleting state.

Resolution

  • Remove manually added dependencies in the AWS console.

Root Cause

  • The cluster is not deleting because of a dependency created by a user in VPC that ROSA uninstaller cannot remove.

Diagnostic Steps

$ rosa logs uninstall -c cluster_name

time="2023-06-26T04:00:31Z" level=debug msg="DependencyViolation: The vpc 'vpc-xxxxxxxxxxxxxxx' has dependencies and cannot be deleted.\n\tstatus code: 400, request id: 7e2823f8-d8aa-xxxx-xxxxx-xxxxxxxxxxxx" arn="arn:aws:ec2:ap-southeast-2:xxxxxxxxxxxx:vpc/vpc-xxxxxxxxxxxxxxx"
time="2023-06-26T04:00:32Z" level=debug msg="DependencyViolation: The dhcpOptions 'dopt-xxxxxxxxxx' has dependencies and cannot be deleted.\n\tstatus code: 400, request id: 528cfxxx-xxxx-xxxx-xxx-xxxxxxxxxx" arn="arn:aws:ec2:ap-southeast-2:xxxxxxxxxxxx:dhcp-options/dopt-0eexxxxxxxxxxx"
time="2023-06-26T04:00:32Z" level=debug msg="search for matching resources by tag in ap-southeast-2 matching aws.Filter{\"kubernetes.io/cluster/cluster_name\":\"owned\"}"
  • Take note of the VPC (or other AWS resource) with the dependency.
  • Using the AWS console search for the AWS resource blocking the deletion and try to delete it.
  • In case of any errors (could be specific to the AWS resource), take note of the errors and the instructions required to remove the dependency.
  • Action the instructions provided.
  • Leave the un-installer to continue the uninstall of the OpenShift cluster.
  • In case the deletion keeps failing please open a support case with Red Hat.

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