Orphans cleanup does not clean recently deleted repos

Solution Verified - Updated -

Environment

Red Hat Satellite 6.11 or newer

Issue

  • having recently deleted custom repos or disabled Red Hat repos
  • running pulp-3 orphans cleanup either via foreman-rake katello:delete_orphaned_content script or via direct pulp API call

But content from the recently removed/disabled repos still occupies /var/lib/pulp/media/artifact directory.

Resolution

For an immediate deletion of content of just disabled/deleted repositories, go to WebUI -> Settings -> Content -> Orphaned Content Protection Time -> change to 1 (time in minutes). And trigger a new rake task:

foreman-rake katello:delete_orphaned_content
  • To delete orphan contents on an External Capsule:
# hammer capsule list
# SMART_PROXY_ID=x foreman-rake katello:delete_orphaned_content RAILS_ENV=production
  where x is the id of the extenal Capsule

Root Cause

Pulp has a protection in removing freshly orphaned content, to prevent concurrently syncing or manipulating with a repo and deleting its content under the hood. See upstream API documentation for more.

Katello can adjust that parameter (with default value 1440 minutes = 1 day) via its setting.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments