Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2037508 - upload-content results in wrong RPM being added to product
Summary: upload-content results in wrong RPM being added to product
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
: 2042854 2050217 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-05 18:50 UTC by Justin Sherrill
Modified: 2022-07-05 14:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:31:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34202 0 Normal New upload-content results in wrong RPM being added to product 2022-01-05 18:50:45 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:32:01 UTC

Description Justin Sherrill 2022-01-05 18:50:44 UTC
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`.

Comment 1 Justin Sherrill 2022-01-05 18:50:48 UTC
Created from redmine issue https://projects.theforeman.org/issues/34202

Comment 2 Justin Sherrill 2022-01-05 18:50:49 UTC
Upstream bug assigned to None

Comment 3 Justin Sherrill 2022-01-05 18:54:18 UTC
This was an upstream bug that we are investigating

Comment 4 Justin Sherrill 2022-01-27 20:24:58 UTC
*** Bug 2042854 has been marked as a duplicate of this bug. ***

Comment 5 Bryan Kearney 2022-02-01 00:05:08 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34202 has been resolved.

Comment 6 Stephen Wadeley 2022-02-08 08:18:49 UTC
Hi

taking QA as agreed with chiggins who is on PTO

Comment 8 Justin Sherrill 2022-02-17 19:00:42 UTC
*** Bug 2050217 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2022-07-05 14:31:37 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 (Moderate: Satellite 6.11 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:5498


Note You need to log in before you can comment on or make changes to this bug.