WCP cluster deletion failed to cleanup the associated Tier-1 gateway
search cancel

WCP cluster deletion failed to cleanup the associated Tier-1 gateway

book

Article ID: 411451

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • WCP Cluster cleanup is failing to Delete the associated Tier-1 gateway with below error.

    025-09-18T14:26:59.582Z error wcp [kubelifecycle/sso_domains_monitor.go:56] Failed to update config map of identity sources on 7f######-####-####-####-##########46. Error: Post "https://10.###.###.##:9443/api/v1/namespaces/kube-system/configmaps?timeout=2m0s": dial tcp 10.###.###.##:##3: connect: no route to host
    ERROR: Cleanup failed! Please try again.
    ERROR: Failed to delete tier-1 <tier1_id>, error {
      "error_code" : 500030,
      "error_message" : "The object path=[/infra/tier-1s/ <tier1_id>] cannot be deleted as either it has children or it is being referenced by other objects path=[/infra/domains/<domain_id>/gateway-policies/Internal_Routing/rules/<rule_id>, /infra/domains/<domain_id>/gateway-policies/<policy_id>/rules/<rule_id>]"
    2025-09-18T14:27:17.083Z error wcp [kubelifecycle/cluster_network.go:231] [opID=67######-########-####-####-####-##########46] Received error cleaning NCP-created resources for cluster <WCP_cluster_domain_id> on NSX Managers: <nsx_manager_fqdn>:443,10.###.###.###:443,10.###.###.###:443,10.###.###.###:443. Err: exit status 2
  • When we try to delete the Tier-1 from using the API we get the below Error.
    {
      "httpStatus" : "PRECONDITION_FAILED",
      "error_code" : 604,
      "module_name" : "common-services",
      "error_message" : "You cannot edit null because it is already modified through another operation and its revision number has changed. You are trying to edit the object which is at an earlier revision number 5. To successfully edit the object, cancel this operation, refresh the object and retry the edit operation."`
    }

Environment

VMware NSX
WCP

Cause

If the Tier-1 associated with WCP cluster has any additional configuration manually configured then WCP will not be able to delete the Tier-1.
Default locale-services were still associated with the Tier-1 hence the Deletion was failing during the WCP Cleanup.

Resolution

  • We have to first remove any local-services which were manually created on the Tier-1.
  • Delete the respective Tier-1

    Eg: To identify and Delete the locale service and tier-1.

       GET https://<NSX>/policy/api/v1/infra/tier-1s/<Tier-1_id>/locale-services

       DELETE https://<NSX>/policy/api/v1/infra/tier-1s/<Tier-1_id>/locale-services/default

       DELETE https://<NSX>/policy/api/v1/infra/tier-1s/<Tier-1_id>