This issue is resolved in VMware Cloud Director 10.5.
Upgrade to VCD 10.5
Workaround:
To workaround this issue, please follow below procedure.
- Take a backup for VCD
- SSH to primary cell with root user
- Connect VCD DB by
su - postgres -c '/opt/vmware/vpostgres/current/bin/psql -d vcloud'
- Run the following query
CREATE OR REPLACE VIEW dgp_view_vdc_datastore_count AS
SELECT ovdc.vdc_id, count(1) AS number_datastores
FROM (
SELECT DISTINCT vdc_storage_lr.vdc_id, sub.datastore_id
FROM (
SELECT pds.datastore_id, pvdc_storage_lr.id
FROM pvdc_sclass_scontainer pds
JOIN prov_vdc_logical_resource pvdc_storage_lr
ON pvdc_storage_lr.prov_vdc_id = pds.prov_vdc_id
AND pvdc_storage_lr.name::text = pds.storage_profile_name::text
AND pvdc_storage_lr.lr_type::text = 'STORAGE_CLASS'::text) sub
JOIN vdc_logical_resource vdc_storage_lr
ON vdc_storage_lr.prov_vdc_lr_id = sub.id) ovdc
GROUP BY ovdc.vdc_id;
If already upgraded to 10.5 or above use the following workaround:
- Take a backup for VCD
- SSH to primary cell with root user
- Connect VCD DB by
su - postgres -c '/opt/vmware/vpostgres/current/bin/psql -d vcloud'
- Run the following query
select populate_cached_pvdc_metrics();
select populate_cached_sc_metrics();
select populate_cached_vdc_metrics();
select populate_cached_vdc_sp_metrics();
This will force the information to be updated. For a more permeant fix please create a Broadcom Support Case with this KB referenced.