Bug 2109260 - When using immediate downloads and retain_package_versions=X, all packages are downloaded and many are immediately orphaned
Summary: When using immediate downloads and retain_package_versions=X, all packages ar...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.12.0
Assignee: satellite6-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-20 19:15 UTC by Daniel Alley
Modified: 2022-11-16 13:34 UTC (History)
7 users (show)

Fixed In Version: pulp-rpm-3.17.8, pulp-rpm-3.14.19
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2122203 (view as bug list)
Environment:
Last Closed: 2022-11-16 13:34:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulp_rpm issues 2479 0 None closed Make retain_package_versions more useful at sync time 2022-07-20 19:15:09 UTC
Red Hat Issue Tracker SAT-12568 0 None None None 2022-08-29 13:54:35 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:54 UTC

Description Daniel Alley 2022-07-20 19:15:10 UTC
Description of problem:

If a user configures retain_package_version=1 (or 2, or 3, or any number), while also using an "immediate" download policy, all packages are downloaded even though they will be immediately orphaned.  This can use a significant amount more network bandwidth on a recurring basis if orphan content is cleaned up regularly and make syncs take longer compared to the alternative of not downloading those packages.

In one sense this is a bugfix, as it resolves unintentional behavior.  But it can also be considered an enhancement, as it would allow users to download only a small portion of the package data and gain significant disk, network and time savings while still using an immediate download policy.


Version-Release number of selected component (if applicable):

6.10, 6.11 (won't be fixed in 6.10)


How reproducible:

Always


Steps to Reproduce:
1.  Set up a sync of a large repository such as RHEL 8 or RHEL 7 using download policy "immediate" and "retain_package_versions=1"
2.  Sync
3.  Observe that 60+gb of packages are downloaded


Expected results:

Sync will complete very quickly, only needing to download ~6gb of packages.


Additional info:

* If orphan cleanup occurs then this process will repeat, multiplying the resource wastage

Comment 1 Daniel Alley 2022-07-20 19:17:23 UTC
Will be fixed in 3.17.8, which is a future release not yet published

Comment 2 pulp-infra@redhat.com 2022-07-20 19:18:18 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 6 Lai 2022-09-12 19:56:42 UTC
Steps to retest:
1. Go to settings and turn rhel download policy to "Immediate"
2. Enable RHEL8 and RHEL7 repos
3. Drill into the product -> <product> -> <repo> page
4. Change the mirroring policy to "additive" for both repos(this will open the "retain package versions" field
5. Edit the "Retain package versions" field to 1
6. Save repo and perform sync

Expected:
Syncing should complete relatively fast and the number of packages should be reduced significantly

Actual:
Syncing completed relative fast (about 10 minutes) and the number of packages is reduced.  For rhel8_baseos, it was 1788 rpms and rhel7, it was 5499.


Verified on 6.12 snap 10 with python39-pulp-rpm-3.17.10-1.el8pc.noarch

Comment 11 errata-xmlrpc 2022-11-16 13:34:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506


Note You need to log in before you can comment on or make changes to this bug.