Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionJessica Richards
2023-03-10 02:49:22 UTC
Description of problem:
When manually importing a package into Red Hat Satellite, it turns out that Satellite sometimes uses the name of the package, and sometimes it uses the metadata within that package. If those two values are inconsistent, then the yum/dnf commands on the host servers will be unable to install the package from Red Hat Satellite.
Version-Release number of selected component (if applicable):
Satellite 6.12.1
Satellite 6.12.2-1
How reproducible:
100%
Steps to Reproduce:
1. create a custom repository
2. upload a file whose name is inconsistent with its metadata
3. enable that repository on a registered host
4. try to install that package
Actual results:
We get errors like this:
[MIRROR] splunkforwarder-9.0.4-de405f4a7979.x86_64.rpm: Status code: 404 for https://moya6xv.usersys.redhat.com/pulp/content/MYORG/Library/custom/my_happy_file_repo/03437541/Packages/s/splunkforwarder-9.0.4-de405f4a7979.x86_64.rpm (IP: 10.8.29.27)
Expected results:
Dependencies resolved.
=============================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================
Installing:
splunkforwarder x86_64 9.0.4-de405f4a7979 MYORG_my_happy_file_repo_03437541 34 M
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total download size: 34 M
Installed size: 116 M
Is this ok [y/N]: y
Downloading Packages:
splunkforwarder-9.0.4-de405f4a7979.x86_64.rpm 19 MB/s | 34 MB 00:01
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 19 MB/s | 34 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: splunkforwarder-9.0.4-de405f4a7979.x86_64 1/1
Installing : splunkforwarder-9.0.4-de405f4a7979.x86_64 1/1
Running scriptlet: splunkforwarder-9.0.4-de405f4a7979.x86_64 1/1
complete
Verifying : splunkforwarder-9.0.4-de405f4a7979.x86_64 1/1
Installed products updated.
Uploading Tracer Profile
Installed:
splunkforwarder-9.0.4-de405f4a7979.x86_64
Complete!
Additional info:
When I look at the original package on my desktop, I see a different package name in the metadata:
# rpm -qp splunkforwarder-9.0.4-de405f4a7979-linux-2.6-x86_64.rpm 2>/dev/null
splunkforwarder-9.0.4-de405f4a7979.x86_64
# rpm -qpi splunkforwarder-9.0.4-de405f4a7979-linux-2.6-x86_64.rpm 2>/dev/null
Name : splunkforwarder
Version : 9.0.4
Release : de405f4a7979
Architecture: x86_64
Install Date: (not installed)
Group : Applications/Internet
Size : 121346797
License : Commercial
Signature : RSA/SHA256, Fri 20 Jan 2023 03:48:30 PM MST, Key ID 5efa01edb3cd4420
Source RPM : splunkforwarder-9.0.4-de405f4a7979.src.rpm
Build Date : Fri 20 Jan 2023 03:48:10 PM MST
Build Host : runner-syekphs-project-7712-concurrent-0
Relocations : /opt
Vendor : Splunk Inc. <info>
Summary : SplunkForwarder
Description :
The platform for machine data.
After I upload it to the Satellite server, I see the name "splunkforwarder-9.0.4-de405f4a7979.x86_64" in the web interface of the Satellite server.
When I find the artifact and run the "file" command against it, I also see that string:
# find /var/lib/pulp/media/artifact -type f -exec file {} \; | grep splunkforwarder | awk '{print $1, $6}' | sort -k2
/var/lib/pulp/media/artifact/a8/d1d6429d54d910760ca5beab8cef7101e65d8e681b2041390ff79d24d96a0f: splunkforwarder-9.0.4-de405f4a7979
However, when I use the following tool to check the database, the entry I see in the database matches the filename on my desktop:
# wget https://raw.githubusercontent.com/waldirio/satellite_tricks/main/pulp3_repo_list.sh
# bash pulp3_repo_list.sh
# egrep splunkforwarder
# egrep splunkforwarder /var/log/pulp3_content_info.log
MYORG/Library/custom/my_happy_file_repo/03437541 | Packages/s/splunkforwarder-9.0.4-de405f4a7979-linux-2.6-x86_64.rpm | artifact/a8/d1d6429d54d910760ca5beab8cef7101e65d8e681b2041390ff79d24d96a0f
We see this package name in that output:
splunkforwarder-9.0.4-de405f4a7979-linux-2.6-x86_64.rpm
However, when I check that pulp3_content_info.log file for the primary.xml.gz file, I get this:
MYORG/Library/custom/my_happy_file_repo/03437541 | repodata/e6c12de9820f055279466f8a48f0b7829fc85c31b2c6bfa6ee7dcba442294c61-primary.xml.gz | artifact/e6/c12de9820f055279466f8a48f0b7829fc85c31b2c6bfa6ee7dcba442294c61
When I zcat that file and grep it for location, I see this:
<location href="Packages/s/splunkforwarder-9.0.4-de405f4a7979.x86_64.rpm"/>
That package name matches what we see in the original error message:
[MIRROR] splunkforwarder-9.0.4-de405f4a7979.x86_64.rpm: Status code: 404 for https://moya6xv.usersys.redhat.com/pulp/content/MYORG/Library/custom/my_happy_file_repo/03437541/Packages/s/splunkforwarder-9.0.4-de405f4a7979.x86_64.rpm (IP: 10.8.29.27)
So in other words, the filename is going into some part of the database. However, the metadata is what goes into the artifact, the primary.xml.gz file for the custom repository, and it's also what shows up in the Satellite's web interface.
I exported the postgres database on my Satellite server to json files, and I was able to find the string "splunkforwarder-9.0.4-de405f4a7979-linux-2.6-x86_64" in these tables:
db: pulpcore
dbexportcore_contentartifact
dbexportcore_publishedartifact
dbexportcore_task
I also searched the exported tables for string "splunkforwarder-9.0.4-de405f4a7979.x86_64", and I found them in these tables:
db: pulpcore
dbexportcore_contentartifact
dbexportcore_publishedartifact
dbexportcore_task
db: foreman
dbexportkatello_installed_packages
dbexportkatello_rpms