Project

General

Profile

Bug #34202

upload-content results in wrong RPM being added to product

Added by Ben Roberts 6 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Uploading an RPM via the webui Product->Repository view, or hammer repository upload-content is accepting an RPM successfully, but then when looking inside the repository package list, a completely different RPM has been added. No errors or warnings are recorded in foreman.log or in journalctl on the foreman host.

Initially I was building a local RPM for a package using the fedora ~ style pre-release version number. Thinking that might be the cause, I rebuild the package using several different version numbering schemes. All resulted in the same behaviour, as did downloading a random RPM from the web, and trying to upload that instead.

In all cases the package that was actually added to the repository instead of the uploaded one was `perl-Data-MessagePack-1.01-6.el8.src`

```
[root@whitefall ~]# hammer package list --product Sihnon --organization sihnon --repository-id=1397
-------|--------------------------------------------|----------------------------------------
ID | FILENAME | SOURCE RPM
-------|--------------------------------------------|----------------------------------------
239429 | nomad-driver-podman-0.3.0-1.el8.x86_64.rpm | nomad-driver-podman-0.3.0-1.el8.src.rpm
256881 | rpmrebuild-2.11-3.el8.noarch.rpm | rpmrebuild-2.11-3.el8.src.rpm
256880 | zfs-auto-snapshot-1.2.4-2.el8.x86_64.rpm | zfs-auto-snapshot-1.2.4-2.el8.src.rpm
-------|--------------------------------------------|----------------------------------------

[root@whitefall ~]# hammer repository upload-content --product Sihnon --organization sihnon --path /home/ben/rpmbuild/RPMS/x86_64/nomad-driver-podman-0.4.0~git20211223.7e3d0182-1.el8.x86_64.rpm --name 'Everything (EL8)'
Successfully uploaded file 'nomad-driver-podman-0.4.0~git20211223.7e3d0182-1.el8.x86_64.rpm'

[root@whitefall ~]# hammer package list --product Sihnon --organization sihnon --repository-id=1397
-------|--------------------------------------------|----------------------------------------
ID | FILENAME | SOURCE RPM
-------|--------------------------------------------|----------------------------------------
239429 | nomad-driver-podman-0.3.0-1.el8.x86_64.rpm | nomad-driver-podman-0.3.0-1.el8.src.rpm
262972 | perl-Data-MessagePack-1.01-6.el8.src.rpm |
256881 | rpmrebuild-2.11-3.el8.noarch.rpm | rpmrebuild-2.11-3.el8.src.rpm
256880 | zfs-auto-snapshot-1.2.4-2.el8.x86_64.rpm | zfs-auto-snapshot-1.2.4-2.el8.src.rpm
-------|--------------------------------------------|----------------------------------------
```

Also tried:
- Installing the latest nightly packages
- Re-running the installer
- Rebooting the host
- Adding RPMs to another repository within the same Product

In all cases, regardless of what the actual RPM is being uploaded is, or what the filename is, the package that gets added to the repository is the same.

Installed versions:
```
[root@whitefall ~]# rpm -qa '*foreman*' '*katello*'
foreman-debug-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
katello-common-4.4.0-0.1.master.el8.noarch
foreman-installer-3.2.0-0.1.develop.20211222031310gite34bd78.el8.noarch
nodejs-theforeman-builder-8.16.0-1.el8.noarch
foreman-postgresql-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
katello-server-ca-1.0-1.noarch
katello-selinux-4.0.2-1.el8.noarch
rubygem-foreman_maintain-1.0.1-1.el8.noarch
foreman-proxy-3.2.0-0.1.develop.20211221171439gitd60623c.el8.noarch
whitefall.jellybean.sihnon.net-foreman-proxy-1.0-3.noarch
katello-debug-4.4.0-0.1.master.el8.noarch
rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el8.noarch
katello-repos-4.4-0.2.nightly.el8.noarch
rubygem-foreman_puppet-3.0.0-1.fm3_2.el8.noarch
foreman-build-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
foreman-vmware-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
rubygem-katello-4.4.0-0.2.pre.master.20211201084334git73323fb.el8.noarch
foreman-cli-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
nodejs-theforeman-vendor-8.16.0-1.el8.noarch
katello-default-ca-1.0-1.noarch
foreman-release-3.2.0-0.1.develop.el8.noarch
katello-certs-tools-2.8.2-1.el8.noarch
foreman-selinux-3.2.0-0.1.develop.20211214154721git4adc0e4.el8.noarch
rubygem-foreman-tasks-core-0.3.5-1.fm2_5.el8.noarch
foreman-installer-katello-3.2.0-0.1.develop.20211222031310gite34bd78.el8.noarch
rubygem-hammer_cli_foreman_tasks-0.0.16-1.fm3_0.el8.noarch
katello-4.4.0-0.1.master.el8.noarch
foreman-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
foreman-dynflow-sidekiq-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
foreman-assets-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
foreman-service-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
rubygem-foreman_remote_execution_core-1.4.4-1.el8.noarch
rubygem-hammer_cli_foreman_puppet-0.0.4-1.fm3_1.el8.noarch
rubygem-foreman-tasks-5.3.0-1.fm3_2.el8.noarch
rubygem-hammer_cli_katello-1.4.0-0.1.pre.master.20211125093815git3fea315.el8.noarch
rubygem-hammer_cli_foreman-3.2.0-0.1.pre.develop.20211221151210git1f7fad5.el8.noarch
rubygem-foreman_remote_execution-5.1.0-1.fm3_2.el8.noarch
foreman-plugin-3.2.0-0.2.develop.20211221193908gita6471d0.el8.noarch
katello-client-bootstrap-1.7.7-1.el8.noarch
```

Attached is the output of `hammer --debug repository upload-content --product Sihnon --organization sihnon --path /home/ben/rpmbuild/RPMS/x86_64/nomad-driver-podman-0.4.0~git20211223.7e3d0182-1.el8.x86_64.rpm --name 'Everything (EL8)' 2>&1`.

foreman-upload.txt foreman-upload.txt 83.9 KB Ben Roberts, 12/23/2021 05:20 PM

Related issues

Has duplicate Katello - Bug #34245: Uploading python packages broken in UI and CLIClosed

Associated revisions

Revision 9803f40e (diff)
Added by Ryan Verdile 5 months ago

Fixes #34202 - Incorrect rpm is uploaded (#9903)

History

#1 Updated by Ben Roberts 6 months ago

This morning I tried creating a new repository and adding my locally-built RPM to it, and see a different bad package being added - openhantek-3.2.5-1.el8.x86_64. The same bad package gets added to any repository I try to upload to today. The only changes made in foreman since first update are daily re-syncs of repositories, and creation of this test repository.

#2 Updated by Jonathon Turel 6 months ago

  • Triaged changed from No to Yes
  • Target version changed from Katello 4.4.0 to Katello 4.3.1

#3 Updated by Justin Sherrill 6 months ago

  • Category set to Repositories

#4 Updated by Justin Sherrill 6 months ago

  • Bugzilla link set to 2037508

#5 Updated by The Foreman Bot 5 months ago

  • Assignee set to Ryan Verdile
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9903 added

#6 Updated by Ryan Verdile 5 months ago

  • Has duplicate Bug #34245: Uploading python packages broken in UI and CLI added

#7 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases Katello 4.5.0 added

#8 Updated by Ryan Verdile 5 months ago

  • Status changed from Ready For Testing to Closed

#9 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/Katello/katello/pull/9975 added

Also available in: Atom PDF