5.2 KiB
Content-Pack-cleanup-for-SaaS-farms_692438713
Context
Over time we see a lot of older CP versions pilling up on our SaaS farms. Each CP zip file is around 350-400MB and it's stored in the DB and on the disk. This can become a problem over time.
Also, the UCMDB server has some scheduled tasks to check the DB and the disk for newer CP files, calculate their checksums, and decide if the DB and disk storage need to be synched for newer CP zip files. This takes time and resources and has a performance impact. The UCMDB server does not do a CP zip file cleanup OOTB.
A. Identify what we have before the cleanup
-
Get the list of used CPs from UCMDB server JMX using the method viewSystemInformation
-
Get the current list of CP versions from the DB. From JMX invoke executeQuery with the SQL query select version from content_packs
-
Example of output for the query
-
Get the list of CPs from the disk. The path is /mnt/cms/var/vols/itom/cms/data-volume/ucmdb/server/content/content_packs
-
Example of the available CPs on the disk
B. Evaluate what we have
- Check that the DB list is the same as the disk list. They should be the same
- Compare the list from the DB and the one from viewSystemInformation to find the CP versions that are not used. In the DB list, CP versions are not present in viewSystemInformation . These are the CP versions to be deleted
- On the disk we may have directories with the same version as some of the CP zip files like CP-24.4.zip and directory 24.4.89. Both of them refer to CP 24.4 and can be deleted if they are not in the Support Matrix and if no customer is using that CP version.
- Be careful about CP version and build number. We can have versions 24.4 build 116 and 24.4 build 117 and they are considered distinct CP versions. None, one or both can be used by a customer(s).
- The current supported CP versions for the deployed UCMDB version need to be kept even if they are not used by any customer as any customer can upgrade to it and we support these versions. The CP Support Matrix is found at https://docs.microfocus.com/doc/Universal_Discovery_Content_Pack/24.4/CPSupportMatrix
- Example: for UCMDB 24.4 we support CP 23.4 but we need to keep this version even if no customer is using it.
- Do a backup of content_packs folder which can be removed after 1 week if there is no issue
C. Cleanup
- When the UCMDB servers are stopped we can delete from the DB and disk the CP versions from above that were not found in viewSystemInformation
- set replicas to 0 for itom-ucmdb sts ( kubectl scale sts itom-ucmdb --replicas=0 -n cms ) 2. check both ucmdb pods are stopped
- Selective deletion of the unused/useless CP versions from the DB and disk. Once you identify a CP version(and build!) that is not used by any customer from viewSystemInformation, it can be deleted from the disk and from the DB one by one. This will take more time but it's safer and the server startup is not affected.
- Keep supported versions as mentioned in step B.4
- Query to delete from UCMDB DB a specific CP version from DB delete from CONTENT_PACKS where version = '2022.11.99'
- Execute the query from UCMDB RDS, at this time, the UCMDB server is stopped, so can't delete it from JMX console 2. use instead of 2022.11.99 any CP version that is no longer needed
- Set replicas back to 2 for itom-ucmdb-sts ( kubectl scale sts itom-ucmdb --replicas=2 -n cms )
D. Validate the results
- Check the output of viewSystemInformation
- List the available CP version in DB with the SQL query select version from content_packs
- List the files in /mnt/cms/var/vols/itom/cms/data-volume/ucmdb/server/content/content_packs
- We should have the same count of CPs and the same CP versions in all 3 sources from above
In the past we had an unofficial cleanup procedure for the on-premise UCMDB
Related pages
- Page: ESM Cloud Farm Version Tracking
- Page: How to get an Opentext Confluence account
- Page: ITOM APM AppPluse Cloud Farm Information
- Page: ITOM Cloud Service Ops Doc Management Process
- Page: ITOM ESM Cloud Service Catalog
- Page: ITOM OpsB NOM Cloud Service Catalog
- Page: OpsB and NOM Cloud Deployments Version Tracking

