From the app logs, errors related to postgresSQL can be seen
App.log
024-09-10 11:19:49.858 UTC [NfvAlarmService_SvcThread-95, Ent: HybridityAdmin, Usr: HybridityAdmin, , TxId: #####-####-####-####-############] ERROR c.v.h.nfvm.alarm.AlarmSyncJob- Unable to run data sync job
com.vmware.hybridity.adapters.objectstore.ObjectStoreException: Cannot create object under key /common/attachments/NfvAlarmService/#####-####-####-####-############/#####-####-####-####-############-11.txt
2024-09-10 11:19:49.858 UTC [NfvAlarmService_SvcThread-95, Ent: HybridityAdmin, Usr: HybridityAdmin, , TxId: #####-####-####-####-############] ERROR c.v.v.h.a.p.PostgresQLAdapter- Error storing file in PostgreSQL: ERROR: nextval: reached maximum value of sequence "objectstore.files_id_seq" (##########)
2.3.x
This is due to the Large number of files are present. These files could be as part of catalogs, or CNF LCM, or CaaS LCM (as part of DIP), etc.
The objectstore.files id field changed to a large number which is completely normal - and expected in environments which are dealing with a lot of files.
To Resolve this issue , we need to update the id to a lower number to just clear up and order the records correctly and reset the sequence counter to a smaller number . This is needed only if the ids in the "objectstore.files" table are not sorted / ordered.
Pre-requisite:
Proceed with the below steps :
SSH admin@<tca-cp>
connect-to-postgres
select count ( * ) from "objectstore.files";
select id, enterprise, organization, filename, "uploadDate" from "objectstore.files" order by id;
update "objectstore.files" set id = 14 where id = <id_of_last_record>;
alter sequence "objectstore.files_id_seq" AS integer;
select count ( * ) from "objectstore.files"; select id, enterprise, organization, filename, "uploadDate" from "objectstore.files" order by id;
alter sequence "objectstore.files_id_seq" AS integer;
alter sequence "objectstore.files_id_seq" RESTART WITH 15;