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)
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.
VMware Cloud Director 10.5
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.
sudo -i -u postgres psql vcloud
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
);