Error: "java.lang.IllegalArgumentException: ComputeHub already part of another hubset" during PVDC creation in VMware Cloud Director
search cancel

Error: "java.lang.IllegalArgumentException: ComputeHub already part of another hubset" during PVDC creation in VMware Cloud Director

book

Article ID: 428349

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

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....

  • Database queries confirm the Resource Pool moref exists in 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:

  • The name here represented as 'TO-BE-DELETED' will be the name of the Cluster selected during the provider VDC wizard
  • The number of 'correct' rows should match the number of Clusters backing up provider VDCs

Environment

10.x

Cause

The issue is caused by a database inconsistency (orphaned record) in the vc_computehub table.

Resolution

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.

  1. Take a Backup: Perform a full backup of the VMware Cloud Director database before proceeding.

  2. 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
     
  3. Access the Database: On the primary cell, enter the PostgreSQL shell:

    sudo -i -u postgres /opt/vmware/vpostgres/current/bin/psql vcloud
     
  4. Delete the orphaned rows: (As per findings above)

    DELETE FROM vc_computehub WHERE id in ('55XXXX','d2XXXX');
     
  5. Attempt to recreate the Provider VDC