I recently encountered this issue when upgrading the VCF from 4.5 to 5.1.
SDDC was upgraded to 5.1 (management domain) when running pre-checks (before stating NSX upgrade) and was getting the vSAN HCL DB out-of-date error.
SDDC manager is connected to VMware online depot via proxy and still seeing the below error. Manually updated the vSAN HCL on the vCenter post that still the error is seen.
As a workaround, I managed to download the all.json file from another computer, transferred it to SDDC Manager using WinSCP, and imported the all.json file using Bundle Transfer Utility onto SDDC Manager by using the below steps:
Take a snapshot of the SDDC Manager VM
SSH to sddc manager using vcf and su to root
Connect to lcm db using the below command
psql -h localhost -U postgres -d lcm
If SDDC Manager is 5.1.1 then use the below command
/usr/pgsql/13/bin/psql -U postgres -h localhost -d lcm
List contents on the table vsan_hcl_attribute
select * from vsan_hcl_attributes;
Note down the local_data_timestamp value which records the latest HCL publish date for vsan_hcl_attributes.
Note: if the value is outdated and/or not the latest then you get an error/warning as per the threshold value
Quit out of the LCM database by usingÂ
\q
Open the below link in your HTML browser:
https://partnerweb.vmware.com/service/vsan/all.json (Right click, Save as)
Save the file as all.json on your local machine. If you are unable to save the file, you must copy the entire content and create a new file with the extension".json"
Copy the latest all.json file from your local machine to /home/vcf folder onto your sddc manager via tools like WinSCP
Use the below command to grab the access token
curl --location 'http://<sddcmanager_fqdn>/v1/tokens' --header 'Content-Type: application/json' --data-raw '{"username":"<SSO_USERNAME>","password":"<SSO_PASSWORD>"}'
cd to /home/vcf (where the latest local copy of all.json is placed)
Upload the HCL file using the HCL upload API using the below command
curl -X PUT --location 'http://<sddcmanager_fqdn>/v1/vsan-hcl/content' --header 'Authorization: Bearer <put the token grabbed from step 7>' --header 'Content-Type: text/plain' -d@all.json
Post successful execution of the API the contents of local_data_timestamp in vsan_hcl_attributes at lcm db will get updated to a new value, please verify the same as stated in step 3
Retry the pre-check to verify that SDDC no longer complains that vSAN HCL DB on SDDC Manager is out of date
After that ran the pre-check again and the error (vSAN HCL DB Out of Date) was cleared this time.