How to force undeploy NAPP in NSX Manager
search cancel

How to 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". 



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.
 

Additional Information

We my get  below error  While using 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 below API to delete 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 resolution section to 'FORCE_UNDEPLOY' NAPP instance.