Cleanup Policy Not Deleting Images On the Container Registry in GitLab 17.6.5-ee
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
The cleanup policy in GitLab version 17.6.5-ee is not functioning as expected. Despite being configured to delete unused images and tags older than 7 days, these items are not being removed from the container registry.
Steps to Reproduce
What is the current bug behavior?
The specified images and tags are not being deleted from the container registry. Additionally, the message "next cleanup scheduled to run on" displays a date in the past, indicating that the cleanup process is not being triggered as expected.
What is the expected correct behavior?
The cleanup policy should automatically delete unused images and tags that are older than 7 days from the container registry, freeing up storage space and maintaining an organized repository.
Update 03/05/2025
From what I understand here &5521, we should definitely have the metadata registry database starting from version 19. So maybe the problem will be resolved by then?
At the moment, we did not have this type of database, and our image registry contains a large number of images. Therefore, I deduce that the job intended to do the cleanup does not have access to the resources quickly enough to do its work. Sidekiq probably destroys the job before it can finish.
More information on the job limitations: https://docs.gitlab.com/development/packages/cleanup_policies/
