Unable to perform administrative tasks on certain Organization VDCs in VMware Cloud Director
search cancel

Unable to perform administrative tasks on certain Organization VDCs in VMware Cloud Director

book

Article ID: 377939

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Unable to update CPU or Memory values of a VDC.
  • Error: "Unable to place the vApp in the VDC" when attempting to create VMs in Cloud Director.
  • Observe a NonUniqueResultException in the logs:

org.hibernate.NonUniqueResultException: query did not return a unique result: 2
        at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
        ...
        at com.vmware.vcloud.fabric.compute.vrp.HibernateVirtualResourcePoolDao.getResourcePool(HibernateVirtualResourcePoolDao.java:67)

  • The VDC affected spans multiple clusters.
  • The CMT command 'opt/vmware/vcloud-director/bin/cell-management-tool detect-rp-mismatches --detect-mismatch-with-vc --vdcs <VCD_NAME>' observes no issues.

Completed detecting resource pool mismatches with VC.
Did not find any resource pool mismatches for VDC or PVDC.

Environment

VMware Cloud Director 10.5

Cause

This issue occurs when Cloud Director performs it's Resource Pool lookup for an Organization VDC and has more than one row returned for what should be a unique result.

As is expects only one row, it is unable to proceed.

Resolution

  1. SSH to the Primary Cell of Cloud Director.
  2. Connect to the Database

sudo -i -u postgres psql vcloud

  1. Run the following to verify if impacted

After running the update queries please share the result of below db query:
select name, id from vrp where
id in (
select vrp_id from vrp_rp
group by vrp_id, computehub_id having count(*) > 1
);

  1. If you receive out for the above, please engage Broadcom Support.