Katello 4.10 During Sync of Local Repository, Katello Removes Local RPM File

Problem:
When syncing a yum repository located at /var/lib/pulp/imports/bnerickson_net/el/7 on the Foreman/Katello host itself, Katello is removing one of the RPMs: xe-guest-utilities-7.30.0-11.x86_64.rpm

Before performing a manual sync, I re-added the RPM, re-signed it with the repo’s GPG key, and re-created the repo (with createrepo):

# ls -l /var/lib/pulp/imports/bnerickson_net/el/7/x86_64/
total 5204
-rw-r--r--. 1 pulp pulp   16924 Nov 10 11:07 ethtool-snmpd-0.2-1.el7.x86_64.rpm
-rw-r--r--. 1 pulp pulp  578658 Nov 10 11:07 hsflowd-centos7-2.0.53-1.x86_64.rpm
-rw-r--r--. 1 pulp pulp 1852796 Nov 10 11:07 powerpanel-1.4.1-0.x86_64.rpm
-rw-r--r--. 1 pulp pulp 1010009 Nov 10 11:07 sas_ir_snmp-17.05-0002.x86_64.rpm
-rw-r--r--. 1 pulp pulp  589014 Nov 10 11:07 sas_snmp-17.05-0002.x86_64.rpm
-rw-r--r--. 1 pulp pulp   19988 Nov 10 11:07 sock-0.3.2-1.x86_64.rpm
-rw-r--r--. 1 pulp pulp 1248036 Nov 17 12:07 xe-guest-utilities-7.30.0-11.x86_64.rpm

After performing a manual complete sync within Foreman:

# ls -l /var/lib/pulp/imports/bnerickson_net/el/7/x86_64/
total 3984
-rw-r--r--. 1 pulp pulp   16924 Nov 10 11:07 ethtool-snmpd-0.2-1.el7.x86_64.rpm
-rw-r--r--. 1 pulp pulp  578658 Nov 10 11:07 hsflowd-centos7-2.0.53-1.x86_64.rpm
-rw-r--r--. 1 pulp pulp 1852796 Nov 10 11:07 powerpanel-1.4.1-0.x86_64.rpm
-rw-r--r--. 1 pulp pulp 1010009 Nov 10 11:07 sas_ir_snmp-17.05-0002.x86_64.rpm
-rw-r--r--. 1 pulp pulp  589014 Nov 10 11:07 sas_snmp-17.05-0002.x86_64.rpm
-rw-r--r--. 1 pulp pulp   19988 Nov 10 11:07 sock-0.3.2-1.x86_64.rpm

The Katello Sync task indicates that the RPM is being associated and then also un-associated:

No content added.
Total steps: 17/17
--------------------------------
Associating Content: 1/1
Downloading Artifacts: 1/1
Downloading Metadata Files: 5/5
Parsed Packages: 9/9
Skipping Packages: 0/0
Un-Associating Content: 1/1

I’ve tried removing the product and underlying repo, deleting the orphaned content with foreman-rake katello:delete_orphaned_content RAILS_ENV=production --trace and re-adding the product/repo to no avail. Is there a Katello repo option I can enable to force Katello NOT to remove RPMs? Is this special behavior because the RPMs are located in the “imports” folder? How can I find out why the RPM is being un-associated?

Expected outcome:
Katello performs local repo synchronization without removing any RPMs in the local yum repository. OR, Katello throws an error if it removes an RPM (if configured to do so) with the reason why it removed the RPM.

Foreman and Proxy versions:

foreman-selinux-3.8.0-1.el8.noarch
foreman-dynflow-sidekiq-3.8.0-1.el8.noarch
foreman-cli-3.8.0-1.el8.noarch
foreman-proxy-3.8.0-1.el8.noarch
ansible-collection-theforeman-foreman-3.14.0-1.el8.noarch
foreman-postgresql-3.8.0-1.el8.noarch
foreman-service-3.8.0-1.el8.noarch
foreman-debug-3.8.0-1.el8.noarch
foreman-obsolete-packages-1.5-1.el8.noarch
nodejs-theforeman-builder-12.2.0-1.el8.noarch
foreman-installer-3.8.0-2.el8.noarch
foreman-assets-3.8.0-1.el8.noarch
nodejs-theforeman-vendor-12.0.1-1.el8.noarch
foreman-installer-katello-3.8.0-2.el8.noarch
foreman-3.8.0-1.el8.noarch

Foreman and Proxy plugin versions:

rubygem-hammer_cli_foreman_remote_execution-0.2.3-1.fm3_7.el8.noarch
rubygem-foreman_remote_execution-11.1.0-1.fm3_8.el8.noarch
rubygem-foreman_ansible-12.0.7-1.fm3_8.el8.noarch
rubygem-hammer_cli_foreman_tasks-0.0.19-1.fm3_7.el8.noarch
rubygem-hammer_cli_foreman_ansible-0.5.0-1.fm3_7.el8.noarch
rubygem-hammer_cli_foreman_webhooks-0.0.4-1.fm3_5.el8.noarch
rubygem-hammer_cli_foreman-3.8.0-1.el8.noarch
rubygem-foreman_maintain-1.3.5-1.el8.noarch
rubygem-foreman_webhooks-3.2.1-1.fm3_8.el8.noarch
rubygem-foreman-tasks-8.2.0-1.fm3_8.el8.noarch

Distribution and version:
CentOS Stream 8
Other relevant data:

Seems just fixed by file:// sync deletes files from directory · Issue #4681 · pulp/pulpcore · GitHub.

1 Like

Thanks for the heads up. Hope the fix is backported into 3.28 soon if applicable.