An attempt to commission the ESX host back the SDDC has failed with an error "<ESX Host FQDN>: Host(s) already present in inventory, validation failed." and it's in Assigned Hosts List.
VCF 9.x
The ESX host commission validation fails because the previous host decommissioning was incomplete, leaving a footprint of the ESX host with the same FQDN in the SDDC database.
platform=# select id, hostname, status from host; id | hostname | status--------------------------------------+-----------------------+-------- <Host ID> | <Working Host FQDN> | ACTIVE <Stale Host ID> | <Stale ESX Host FQDN>| ACTIVEThe recommended solution is to manually clean up the failed stale ESX host entry from the SDDC Manager PostgreSQL database using a series of DELETE statements across multiple tables followed by restarting SDDC Manager services to fix the issue.
Directly removing the inconsistent host entries from the SDDC Manager database resolves the underlying data inconsistency, clearing the ESX host from the Assigned Host list and allowing the host commissioning process to succeed upon a retry using same FQDN.
Contact Broadcom Support request to resolve the issue as the resolution steps involve updating the SDDC database.