To provide manual steps to remove the partial records for an ESXI host transport node with API call first and if API fails, then from the embedded Corfu database within NSX-T.
When attempting to prepare a ESXI host as a host transport node, the process fails with an indication that the NSX Manager cannot find the record for the host, referencing old metadata elements for that host, i.e. old IP different external uuid, "Node <uuid> with same ip <ip-address> already exists", etc.
Or
you receive the following error while trying to configure NSX on ESXi host
"Error: Operation cannot be performed as the object(s) has been updated by another user while you were trying. Refresh and try again. (Error code: 500071)"
VMware NSX-T Data Center
VMware NSX
This behavior is caused by a partial record for a host transport node that includes metadata that references the host that is trying to prepare as a host transport node. The TN creation workflow can halt prematurely while retrieving the thumbprint for the host certificate. If the certificate is not in the correct format ( a common causes extra spaces or formatting characters in the certificate body) this will cause a parsing failure and leave a partial record for that host.
Before going to the Corfu database it may be possible to force a cleanup by REST API:
DELETE /api/v1/transport-nodes/<transport-node-id>?force=true&unprepare_host=false
You can validate the deletion by running the below API:
Workaround:
This issue can be worked around by recreating the ESXI host with a full set of new metadata, assuming that the underlying certificate issue is no longer present on the "new" host.