When attempting to delete a Supervisor cluster, the process gets stuck because the deletion of NSX objects from NSX Manager fails. This causes the cleanup request to fail, resulting in the supervisor cluster being unable to delete successfully.
/var/log/vmware/wcp/wcpsvc.log:
NSX resource removal did not fully complete for zone=######### in cluster=domain-c8. NSX cleanup failed: exit status 1.
Unable to disable cluster domain-c8. Err NSX cleanup failed: NSX cleanup failed: exit status 1.
VMware vSphere with Tanzu
The issue occurs when the NSX resources associated with the Supervisor cluster cannot be fully removed. The failure is due to an unsuccessful NSX cleanup process.
To resolve the issue, perform the following steps:
# cp /usr/lib/vmware-wcp/nsx_policy_cleanup.py /usr/lib/vmware-wcp/nsx_policy_cleanup.py.bk
# vi /usr/lib/vmware-wcp/nsx_policy_cleanup.py
self.username = "nsxusername" # NSX Manager username
self.password = "nsxpassword" # NSX Manager password
self.vc.endpoint = None # Set the vCenter endpoint to None
self.vc_username = None # Remove vCenter username
self.vc_password = None # Remove vCenter password
# vmon-cli -r wcp
# python3 /usr/lib/vmware-wcp/nsx_policy_cleanup.py --cluster domain-c8:########### -u admin -p 'nsxmangerpassword' --mgr-ip=##.##.##.## --no-warning --top-tier-router-id=domain-c8:########## --all-res -r
Ensure you replace the placeholders above with the appropriate values:
nsxmangerpassword - Password for the NSX Manager.
##.##.##.## - IP address of your NSX Manager.
########## - Top-tier router ID.
After performing these steps, the Supervisor cluster should be able to delete successfully, and the NSX Manager cleanup issue will be resolved.