Katello continues generating two yum/dnf cache files after implementing RHEL suggested fix

Problem:

  • /var/cache/yum takes up significantly more space on hosts receiving repos through Foreman Subscription-Manager than on hosts receiving repos from Foreman via base url without using subscription-manager
  • Implemented fix per this RedHat KB article, commands to what I believe to be correct for pulp 3 CLI.

The commands that have been run on Katello host respectively

# pulp --force rpm repository update --name "<repo_id_redacted>" --sqlite-metadata
# pulp --force rpm repository update --name "<repo_id_redacted>" 
# reboot
  • After running commands listed above, .xml and .xml.sqlite files still appear in gen directory in yum cache

Expected outcome:
Only .sqlite file appears in the gen directory /var/cache/yum/<repo name> consumes less space

Foreman and Proxy versions:
foreman-3.4.1-1.el8.noarch
foreman-proxy-3.4.1-1.el8.noarch

Foreman and Proxy plugin versions:
katello-4.6.2.1-1.el8.noarch

Distribution and version:
Centos Stream 8

Other relevant data:
Issue occurring only with CentOS 7.9 hosts.
The other hosts registered to Foreman are AlmaLinux 8 and 9 and using dnf seem to be more normal sized.

In the errata repo on Foreman we adjusted Mirroring Policy to Additive, Retain Package versions to 1 but this did not seem to change anything.

Ran yum makecache and gathered repo info on one machine using subscription manager and using Foreman base url:

On host getting repo from Foreman thru Subscription Manager

[root@host1 7]# yum repoinfo ORG_CentOS_7_centos7-errata
Loaded plugins: product-id, search-disabled-repos, subscription-
              : manager
Repo-id      : errata
Repo-name    : errata
Repo-status  : enabled
Repo-revision: 1678356508
Repo-updated : Thu Mar  9 02:08:25 2023
Repo-pkgs    : 4,839
Repo-size    : 33 G
Repo-baseurl : https://foreman.org.ca/pulp/content/ORG/Library/CentOS_7_Base/custom/CentOS_7/centos7-errata
Repo-expire  : 1 second(s) (last: Mon Mar 13 11:38:23 2023)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/redhat.repo

repolist: 4,839
[root@host1 7]# 

On host getting repo directly from Foreman base URL

[root@host2 7]# yum repoinfo errata
Loaded plugins: product-id, search-disabled-repos, subscription-
              : manager
Repo-id      : errata
Repo-name    : errata
Repo-status  : enabled
Repo-revision: 1678737828
Repo-updated : Mon Mar 13 13:03:47 2023
Repo-pkgs    : 1,673
Repo-size    : 3.3 G
Repo-baseurl : https://foreman.org.ca/pulp/content/ORG/Library/custom/CentOS_7/centos7-errata/
Repo-expire  : 21,600 second(s) (last: Mon Mar 13 13:23:30 2023)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/errata.repo

repolist: 1,673
[root@host2 7]# 

I have not followed the attached case closely but from the workaround

pulp-admin rpm repo publish run --repo-id <repoid> --force-full

It seems like we need a force publish of the repo. Since your repo is in a content view from what I can tell, you might need the extra step of re-publishing the CV