Unregister a Failed VMware Cloud Director Appliance Primary or Standby Cell in a Database High Availability Cluster using API
search cancel

Unregister a Failed VMware Cloud Director Appliance Primary or Standby Cell in a Database High Availability Cluster using API

book

Article ID: 335232

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

For scenarios like below, appliance nodes will have to be removed and redeployed.

  • Cluster degraded after an upgrade from VCD 10.5.x to VCD 10.6.x.
  • VAMI UI shows primary node as 'running' and standby node 'unreachable'.
  • The cluster health is READ ONLY PRIMARY from the VAMI UI.
  • Provider UI is functional with only primary cell running as expected.

This article details the steps to authenticate and execute appliance API methods to manage the cluster. 

Environment

VMware Cloud Director 10.6

Resolution

Either cURL or Postman can be used to run the API requests. Steps are as below:

Using cURL:

  1. SSH to one of the active nodes with root user.
    Use the IP or FQDN of this node to replace <active node IP or FQDN> within the following steps.

  2. Create a new session to get the authorization token:
    curl -k -X POST -u root "https://<active node IP or FQDN>:5480/api/1.0.0/sessions"

    Output will be of the following format:
    {
      "authToken": "<token>",
      "expires": "<timestamp>"
    }

  3. Get the information of all the nodes in the cluster using the token from step 2:
    curl -k -X GET -H "Accept: application/json" -H "Authorization: Bearer <authToken>"  "https://<active node IP or FQDN>:5480/api/1.0.0/nodes"

    Note the "name": "string", of the inactive node from the output.

  4. Unregister the inactive node using the name from the previous step.
    curl -k -X DELETE -H "Accept: application/json" -H "Authorization: Bearer <authToken>"  "https://<active node IP or FQDN>:5480/api/1.0.0/nodes/<Inactive_Node_Name>"

  5. Verify from VAMI or by running Step 3 again that the inactive node is successfully removed.

Using Postman:

  1. Create a new session to get the authorization token:

    1. Use 'Basic' type and enter the root user credentials in the 'Authorization' section.
    2. Method: POST
    3. API request: https://<active node IP or FQDN>:5480/api/1.0.0/sessions

  2. Get the information of all the nodes in the cluster using the token from step 1.Note the "name" of the inactive node from the output.
    1. Use 'Bearer Token' type and enter the token from the authentication step in the 'Authorization' section.

    2. Method : GET

    3. API request: https://<active node IP or FQDN>:5480/api/1.0.0/nodes

    4. Use header Accept: application/json

  3. Delete the inactive node using the 'name' noted from the previous step:

    1. Use 'Bearer Token' type and enter the token from the authentication step in the 'Authorization' section.

    2. Method : DELETE

    3. API request: https://<active node IP or FQDN>:5480/api/1.0.0/nodes/<Inactive_Node_Name>

    4. Use header Accept: application/json

  4. Verify from VAMI or by running Step 2 again that the inactive node is successfully removed.

Additional Information

View Your VMware Cloud Director Appliance Cluster Health and Failover Mode

Get Nodes/Responses