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.
Created from redmine issue https://projects.theforeman.org/issues/35120
Upstream bug assigned to None
Discovered in Katello 4.4. Attach to the next version of Satellite after 6.11.
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35120 has been resolved.
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)
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