Bug 2101579 - Retain packages on Repository removes RPMs from Pulp but not from Katello
Summary: Retain packages on Repository removes RPMs from Pulp but not from Katello
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.12.0
Assignee: Samir Jha
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-27 21:30 UTC by Ian Ballou
Modified: 2022-11-16 13:34 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-katello-4.5.0.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:34:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35120 0 Normal New Retain packages on Repository removes RPMs from Pulp but not from Katello 2022-06-27 21:30:38 UTC
Red Hat Issue Tracker SAT-11283 0 None None None 2022-08-22 18:03:25 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:24 UTC

Description Ian Ballou 2022-06-27 21:30:37 UTC
Community post: https://community.theforeman.org/t/pulp3-yum-repo-off-by-one-retain-package-count-with-additive-mirroring-policy/29131

If a repo is synced with additive, the retain package version amount is lowered, and then the repo is synced again, RPMs will be removed from the Pulp repo but Katello will not disassociate the related Rpm records.

To reproduce:

1) Sync https://fixtures.pulpproject.org/rpm-with-modules/
  -> Additive, Retain package versions 3
2) Change retain package versions to 2
3) Perform a complete sync
4) Check the RPM count in Katello. It should not go down.
5) Check the RPM count in Pulp. It should be lower.

Comment 1 Ian Ballou 2022-06-27 21:30:41 UTC
Created from redmine issue https://projects.theforeman.org/issues/35120

Comment 2 Ian Ballou 2022-06-27 21:30:42 UTC
Upstream bug assigned to None

Comment 3 Ian Ballou 2022-06-27 21:43:09 UTC
Discovered in Katello 4.4.  Attach to the next version of Satellite after 6.11.

Comment 5 Bryan Kearney 2022-08-16 16:04:44 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35120 has been resolved.

Comment 11 Ian Ballou 2022-10-04 16:16:49 UTC
Verified!

Steps to reproduce:

1) Sync RHEL 8 BaseOS and check that packages have more than one version
2) Set the mirroring policy to "Additive" and restrict one version of packages
3) Run a complete sync on the repository
4) See that, now, only one version of RPMs exist in the repository
5) Create a content view that has the BaseOS repository
6) Create an RPM filter on the content view that includes all RPMS
7) See that the content view publish succeeds.

(I added the content view steps because there was always a chance with this BZ that the wrongly-associated RPMs would cause a 404 from Pulp at copy time)

Comment 15 errata-xmlrpc 2022-11-16 13:34:13 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.