Unable to delete content Library that are stuck as NOT READY or PARTIALLY READY status in VCF Automation 9.x
search cancel

Unable to delete content Library that are stuck as NOT READY or PARTIALLY READY status in VCF Automation 9.x

book

Article ID: 415481

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

  • While creating content library in VCF Automation 9.x, it gets stuck in NOT READY or PARTIALLY READY status in VCF Automation UI

[ ########-####-####-####-############ ] Internal Server Error
- class com.vmware.ssdc.val.types.StoragePodVALRef cannot be cast to class com.vmware.ssdc.val.types.DatastoreVALRef (com.vmware.ssdc.val.types.StoragePodVALRef and com.vmware.ssdc.val.types.DatastoreVALRef are in unnamed module of loader java.net.FactoryURLClassLoader @50f8360d)

 

Environment

VCF Automation 9.x

Cause

This is caused if the storage policy used to create VCFA content library has storage pods instead of normal datastores

Resolution

  1. SSH to VCF Automation appliance as vmware-system-user. 
  2. Change the user to root.
    • sudo su root
  3. Export kubeconfig details (to use kubectl commands).
    • export KUBECONFIG=/etc/kubernetes/admin.conf
  4. Check and validate if tenantmanager pod is running. 
    • kubectl get pods -n prelude | grep tenant-manager
  5. Connect to tenantmanager database. 
    • kubectl exec -it vcfapostgres-0 -n prelude -- /bin/bash

    • psql -U postgres tenantmanager

  6. Identify the content library in catalog table and change the status of the content library from NOT_READY to FAILED
    • select * from catalog; --> This will list all the content libraries visible in the UI
    • update catalog set status = 'FAILED' where status = 'NOT_READY'; --> This will update all the content libraries where the status is NOT READY
  7. Now go back to the VCF Automation UI and click on three ellipses next to content library that you wish you delete and click delete. 
  8. If the content library doesn't gets deleted post executing the above DB commands, verify the status of dependent content library items of the content library.
    • select * from catalog_item; --> This will list all the dependent content libraries items within the content library.
    • update catalog_item set status='FAILED' where item_status='NOT_READY'; --> This will update all the dependent content libraries items within the content library where the status is NOT READY

Note: Optionally, you can select the option force delete box and delete the content library.