Force undeploy NAPP in NSX Manager
search cancel

Force undeploy NAPP in NSX Manager

book

Article ID: 313953

calendar_today

Updated On:

Products

VMware NSX VMware NSX-T Data Center VMware vDefend Firewall with Advanced Threat Prevention

Issue/Introduction

Unable to remove NAPP from NSX-T UI. Tried the UI delete option under System > NSX Application Platform > Actions but reported error "The system encountered a problem and is unable to connect to the NSX Application Platform". 



If NAPP was already removed, but not completely, you may see UI unable to load as below:

Environment

VMware NSX-T Data Center
VMware NSX
NAPP

Cause

This issue may arise due to a communication breakdown between NSX and NAPP.

Resolution

Use the PATCH API below with FORCE_UNDEPLOY option to delete NAPP instance.

PATCH /policy/api/v1/infra/sites/default/napp/deployment/platform

{
  "deployment_action": {
      "action": "FORCE_UNDEPLOY"
  }
}
 

OR, 

From NSX cli root mode.

curl -k -H "Content-Type:application/json" -u admin -X PATCH https://localhost/policy/api/v1/infra/sites/default/napp/deployment/platform -d '{ "deployment_action": { "action": "FORCE_UNDEPLOY" } }' 

After calling API, delete NAPP components on k8s cluster manually if there are any left.

Follow the steps mentioned in below doc for manual cleanup of k8s cluster.

Clean up the Kubernetes Cluster After an Incomplete Delete Action
 

Additional Information

We may get below error while using the API to delete the NAPP deploy forcefully. 
 
{
    "httpStatus": "BAD_REQUEST",
    "error_code": 46053,
    "module_name": "NAPP",
    "error_message": "Please delete Upgrade Coordinator before deleting NSX Application Platform."

So, for deleting the Upgrade Coordinator, we can use below method to delete the upgrade-coordinator

  We can use the below API to delete the upgrade coordinator

PATCH 
'/policy/api/v1/infra/sites/default/napp/deployment/upgrade-coordinator'

with body:
'{ "deployment_action": { "action": "FORCE_UNDEPLOY" } }' 

or from NSX CLI root mode. 

curl -k -u admin -H "Content-Type:application/json" -X PATCH https://localhost/policy/api/v1/infra/sites/default/napp/deployment/upgrade-coordinator' -d '{"deployment_action":{"action": "FORCE_UNDEPLOY"}}'

Then wait for some time, and then run the API mentioned in the resolution section to 'FORCE_UNDEPLOY' NAPP instance.