Using API calls to Redeploy Edge Node.
search cancel

Using API calls to Redeploy Edge Node.

book

Article ID: 379046

calendar_today

Updated On:

Products

VMware NSX VMware NSX-T Data Center

Issue/Introduction

There are circumstances where it is advised to redeploy an edge node.  This article is specific to the method that utilizes API calls to perform the edge redeployment.

Environment

  • VMware NSX
  • VMware NSX-T Data Center

Cause

There is an issue where after an upgrade is performed the edges fail to come online as expected.  After the recommended reboot of the edges one or both may not return to normal function.  This is sometimes caused by a  memory leak that is native to Linux.  

This issue can be found in this link: KB:  Memory leaks in NSX-T Edge

 

Resolution

Redeploy Edge Node using API calls.

The original Edge still exists and the redeployment of the edge will use all the exact configurations of the edge being redeployed.

1.  Install or open Postman API agent application.  This application will be used to execute the API calls against the NSX manager.

2.  Postman will require the use of authentication to communicate with the NSX manager. 

The user and password account to use is admin / <password>

This is configured in Postman via the Authentication tab.

3.  In the NSX manager get the UUID for the edge to be redeployed.  

System ⇒Fabric ⇒Nodes ⇒Edge Transport Nodes

Double click on the value in ID field next to the edge to be redeployed.  Copy the full UUID.


4. Power off NSX Edge node.

 

5. Verify that the NSX Edge node is disconnected from NSX Manager by running the following API command.

GET api/v1/transport-nodes/<edgenode>/state

"node_deployment_state": {"state": MPA_Disconnected"}

The node_deployment_state value is MPA Disconnected, which indicates you can proceed to redeploy the NSX Edge node.

 

6.  Execute the GET API call using Postman to retrieve the configurations of the edge being redeployed.

GET //<NSX Manager IP>/policy/api/ v1/transport-nodes/<UUID>

The output of this command will be used in the POST API call for the edge redeployment. 

 

7.  Copy the output from the GET api call into the body of the POST api call.

5. The POST command is now ready to be created.  The API call will have appended to it ?action=redeploy.  The output from the previous GET command will be copied into the body of the POST command.

Change GET to POST append to the command “?action=redeploy


POST //<NSX Manager IP>/policy/api/v1/transport-nodes/<UUID>?action=redeploy

 

NOTE:

There can be an error thrown concerning the policy object having a different reversion than the current system reversion.

Note here the version for 1,133 is for the older NSX version.  The current version for the system is expecting is 1,136.

This will needed to be edited in the body of the POST API call.

Using an editor such as NotePad++ find and replace the revision number with the correct revision.

This example is taken from NotePad++. Copy the edited body from NotePad++ and paste it into the POST API call's body.

The Redeploy API should now complete successfully.

Additional Information

Official VMware documentation detailing these instructions:
Redeploy an NSX Edge VM Appliance