Unable to delete the cluster of a Workload Domain in SDDC Manager
search cancel

Unable to delete the cluster of a Workload Domain in SDDC Manager

book

Article ID: 321677

calendar_today

Updated On:

Products

VMware Cloud Foundation VMware Cloud Foundation 4.x VMware Cloud Foundation 5.x VMware SDDC Manager

Issue/Introduction

Symptoms:

  • Unable to delete the default Workload Cluster from the SDDC Manager GUI or via API
  • Delete option is unavailable or disabled/"greyed out" for the Cluster



Environment

VMware Cloud Foundation 4.x

VMware Cloud Foundation 5.x

Cause

The default Workload cluster of a domain cannot be removed.
Removal of MGMT Domain (and its cluster) is also not allowed.

Resolution

Note: This is a destructive operation. Please ensure that all necessary backups and snapshots are taken prior to proceeding with the steps below to avoid any issue.

To be able to delete the current default cluster of a Workload Domain, we have to set another cluster in the Workload Domain as default, so that the required cluster can be successfully deleted. 

  1. Take a snapshot of the SDDC Manager VM
  2. SSH into the SDDC Manager VM with the vcf user, then elevate to root (su root)
  3. Connect to the SDDC Manager platform DB:
    • VCF < 5.x : psql -h localhost -U postgres -d platform
      VCF >=5.x : /usr/pgsql/13/bin/psql -h localhost -U postgres -d platform
  4. Select * from cluster where name='<clusterName>';
    Make sure the command returns with one single record and validate is_default "t" or "f"
  5. To update a cluster to be the default cluster run the following update command:  
    update cluster set is_default='t' where name='<clusterName>'; 
  6. Update the previous default cluster to a non-default cluster run the following command: 
    update cluster set is_default='f' where name='<clusterName>';
  7. Exit database 
    •  \q
  8. Restart the domainmanager service
    systemctl restart domainmanager 
  9. Attempt the Cluster delete workflow from the SDDC Manager UI or via API.

If you require assistance with this activity, please log a case through the Broadcom Support Portal to engage a Technical Support Engineer (TSE). Ensure that a snapshot of the SDDC Manager VM is taken beforehand, and reference this Knowledge Base (KB) article when submitting the case to support.