Hi,
We configured on a vSphere vCenter 6.7 a syncing content library on a DC1 using a content library with 5 VMs on a DC2 imported using Clonetocontentlibrary. The sync completed the first vm however the others we not successfully synced ("?"-symbol on VM) . The task freezed at 3%. Cancelling the task was processed. However retrigger the sync freezes at 0%.
We tried to delete the target contentlibrary. Therefore the sync was stopped. However each cleanup throws com.vmware.cl.SyncLibraryItemFailEvent. Any idea how to cleanup the content library successfully ?
Most likely a stale entry in VCDB .
To resolve this issue delete stale entry from VCDB after backing up VCDB.
- VCDB=# select id,name from cl_library;
id | name
--------------------------------------+-------
8bc3326e-3a0b-49e6-9be0-acb18b91d4b2 | Test
3b4280d3-b878-4428-85d0-867cb8252e66 | Stale
- VCDB=# select * from cl_library_storage;
library_id | storage_id
--------------------------------------+--------------------------------------
8bc3326e-3a0b-49e6-9be0-acb18b91d4b2 | ff3f7160-0731-4d01-9cc0-a2cce03ab3ce
3b4280d3-b878-4428-85d0-867cb8252e66 | 1325cd29-0b3e-4be4-8445-625da0dce452
(2 rows)
- VCDB=# select * from cl_storage;
id | storageuri | type
--------------------------------------+-------------------------------------------------------------+-----------
ff3f7160-0731-4d01-9cc0-a2cce03ab3ce | Datastore:datastore-11:f271f3f1-a924-4519-a3f5-e9a75d962888 | Datastore
1325cd29-0b3e-4be4-8445-625da0dce452 | Datastore:datastore-11:f271f3f1-a924-4519-a3f5-e9a75d962888 | Datastore
(2 rows)
- VCDB=# select id,name from vpx_datastore where id=11;
id | name
----+------
11 | DS1
(1 row)
Note: As per the snippets above, we see the id for the library is "3b4280d3-b878-4428-85d0-867cb8252e66". The storage id for the same library is "1325cd29-0b3e-4be4-8445-625da0dce452". When we check the location, we see that the library is saved in the datastore with id "11" (Datastore:datastore-11:f271f3f1-a924-4519-a3f5-e9a75d962888) We can get the datastore name from the datastore table, which is "DS1" here.
To remove stale entry follow below order.
VCDB=# delete from cl_library_storage where library_id='3b4280d3-b878-4428-85d0-867cb8252e66';
VCDB=# delete from cl_storage where id='1325cd29-0b3e-4be4-8445-625da0dce452';
VCDB=# delete from cl_library where id='3b4280d3-b878-4428-85d0-867cb8252e66';
The output for each of the above command would return "DELETE 1",Once deleted, we can log in to the web client.
Please confirm if you have followed below steps :
Prerequisites
Required privilege: Content library > Delete subscribed library or Content library > Delete local library on the type of library you want to delete.
Procedure
Results
The content library and all its contents are deleted.
This could have been saved in VC DB , check out below link :
https://www.reddit.com/r/vmware/comments/62prjo/unable_to_delete_content_library/
Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.
Regards
Gayathri
Most likely a stale entry in VCDB .
To resolve this issue delete stale entry from VCDB after backing up VCDB.
- VCDB=# select id,name from cl_library;
id | name
--------------------------------------+-------
8bc3326e-3a0b-49e6-9be0-acb18b91d4b2 | Test
3b4280d3-b878-4428-85d0-867cb8252e66 | Stale
- VCDB=# select * from cl_library_storage;
library_id | storage_id
--------------------------------------+--------------------------------------
8bc3326e-3a0b-49e6-9be0-acb18b91d4b2 | ff3f7160-0731-4d01-9cc0-a2cce03ab3ce
3b4280d3-b878-4428-85d0-867cb8252e66 | 1325cd29-0b3e-4be4-8445-625da0dce452
(2 rows)
- VCDB=# select * from cl_storage;
id | storageuri | type
--------------------------------------+-------------------------------------------------------------+-----------
ff3f7160-0731-4d01-9cc0-a2cce03ab3ce | Datastore:datastore-11:f271f3f1-a924-4519-a3f5-e9a75d962888 | Datastore
1325cd29-0b3e-4be4-8445-625da0dce452 | Datastore:datastore-11:f271f3f1-a924-4519-a3f5-e9a75d962888 | Datastore
(2 rows)
- VCDB=# select id,name from vpx_datastore where id=11;
id | name
----+------
11 | DS1
(1 row)
Note: As per the snippets above, we see the id for the library is "3b4280d3-b878-4428-85d0-867cb8252e66". The storage id for the same library is "1325cd29-0b3e-4be4-8445-625da0dce452". When we check the location, we see that the library is saved in the datastore with id "11" (Datastore:datastore-11:f271f3f1-a924-4519-a3f5-e9a75d962888) We can get the datastore name from the datastore table, which is "DS1" here.
To remove stale entry follow below order.
VCDB=# delete from cl_library_storage where library_id='3b4280d3-b878-4428-85d0-867cb8252e66';
VCDB=# delete from cl_storage where id='1325cd29-0b3e-4be4-8445-625da0dce452';
VCDB=# delete from cl_library where id='3b4280d3-b878-4428-85d0-867cb8252e66';
The output for each of the above command would return "DELETE 1",Once deleted, we can log in to the web client.
Hi,
The procedure works!
However no idea why the gui klicks didn't work. tail -f /var/log/vmware/content-library/cls.log didn't throw anything obvious (?), saved the cls-xx.log.gz just in case.
I've recreating a new content library and the sync started as expected.
Thanks!
Daniel