When creating or reconfiguring a Provider Virtual Data Center (PVDC) in VMware Cloud Director (VCD), the task fails with a HubSet conflict.
Symptoms:
The VCD UI displays: java.lang.IllegalArgumentException: ComputeHub already part of another hubset.
vcloud-container-debug.log shows: Resource pool [vcId=..., moref=resgroup-XXXXX] not found! Waiting a sec....
vc_computehub but is not backed up by any provider VDC: (There is also another stale entry from a previous attempt)select
vc_computehub.id,
ccr_inv.name as Cluster,
rpi.name as Prov_Backing_RP,
prov_vdc.name as Prov
from vc_computehub
left join resource_pool_inv rpi on rpi.moref = vc_computehub.rp_moref
left join cluster_compute_resource_inv ccr_inv on ccr_inv.moref = rpi.cr_moref
left join prov_vdc on prov_vdc.rp_moref = vc_computehub.rp_moref;
Notes:
10.x
The issue is caused by a database inconsistency (orphaned record) in the vc_computehub table.
Before attempting these steps, confirm that the failed created provider VDC was deleted from the UI and also from the 'Stranded Items'. If a 'System VDC' resource pool was created in vCenter inside the cluster, also make sure to delete it.
To resolve this issue, the orphaned record must be manually removed from the VCD database.
Take a Backup: Perform a full backup of the VMware Cloud Director database before proceeding.
Identify the Primary Cell: Log in to any VCD cell via SSH as root and identify the database primary:
sudo -i -u postgres repmgr node check --role
Access the Database: On the primary cell, enter the PostgreSQL shell:
sudo -i -u postgres /opt/vmware/vpostgres/current/bin/psql vcloud
Delete the orphaned rows: (As per findings above)
DELETE FROM vc_computehub WHERE id in ('55XXXX','d2XXXX');