Manual Content Library Deletion from vCenter Causes Synchronization Errors in VCF Automation
search cancel

Manual Content Library Deletion from vCenter Causes Synchronization Errors in VCF Automation

book

Article ID: 449721

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

  • This article addresses an issue where a Content Library in VCF Automation (formerly Aria Automation) enters an error state or fails to synchronize after being manually deleted directly from the vCenter Server interface rather than through the VCF Automation management console.
  • The Content Library remains visible in the VCF Automation UI but displays a persistent error state. Attempts to delete or resync the library via the UI may fail because the underlying resource no longer exists in vCenter.

Environment

  • Product: VCF Automation 9.x

Cause

  • The root cause is a state mismatch between the VCF Automation database and the vCenter Server inventory. When a content library is removed directly from vCenter, VCF Automation is not notified of the deletion. Consequently, its database still holds a reference to a non-existent library_id, leading to synchronization failures during automated inventory collection.

Resolution

To resolve this issue, the stale entries must be manually cleaned from the VCF Automation database.

Prerequisites:

  • Take a backup of the VCFA cluster. 
  • Need vmware-system-user password for VCFA nodes. 

Steps:

  1. ssh to one of the VCFA Nodes as vmware-system-user
  2. Elevate the permissions to root
  3. Export the kubeconfig file
    • export KUBECONFIG=/etc/kubernetes/admin.conf
  4. Find the postgres pod and login to the VCFA DB :
    • kubectl -n prelude -it exec vcfapostgres-0 -- bash
  5. Switch to postgres user
    • su - postgres
  6. Change to postgres db:
    • psql
  7. go to extended mode
    • \x
  8. change to tenantmanager db:
    • \c tenantmanager;
  9. Run the below query to list the catalog items:
    • select * from catalog;
  10. Find the record with "Not ready" state and note the catalog id. 
  11. Delete the catalog entry from DB :
    • DELETE from catalog where id ='#####-####-####-#####';
  12. Quit
  13. Exit

Now the VCFA UI should no longer show the problematic Content Library.