Bug 2162591

Summary: Oracle JDK rpms no longer work
Product: Red Hat Satellite Reporter: matt jia <mjia>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.12.1CC: ahumbe, choule, dalley, iballou, oliver, saydas
Target Milestone: 6.13.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-23 06:21:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description matt jia 2023-01-20 05:00:28 UTC
Description of problem:

Installing/Updating jdk1.8 fails with 

https://satellite612.example.com/pulp/content/Default_Organization/Library/custom/Centos/oracle2/Packages/j/jdk1.8-2000%3A1.8.0_361-fcs.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found

Version-Release number of selected component (if applicable):

6.12

How reproducible:

Easy

Steps to Reproduce:
1. create a custom repository
2. import jdk-8u361-linux-x64.rpm
3. on a client, yum install jdk1.8

Actual results:

HTTPS Error 404 - Not Found

Expected results:

the package should be able to be installed

Additional info:

Comment 2 Brad Buckingham 2023-01-23 14:19:34 UTC
Does this only apply to the jdk rpm described or any rpm that has been imported/uploaded?  Thanks!

Comment 3 Brad Buckingham 2023-01-23 14:20:01 UTC
Ian, 

Would this be something for Katello or Pulp?  Thanks!

Comment 4 Ian Ballou 2023-01-23 16:47:25 UTC
If the RPM isn't uploaded like Brad asked, is it called jdk1.8-1.8.0_361-fcs.x86_64.rpm or jdk-8u351-linux-x64.rpm in the upstream repository?

I'll put this on the Pulp component since Katello doesn't manage the RPM names of synced repositories. We have a similar issue reported elsewhere regarding uploaded RPMs, but that is also on the Pulp component at the moment.

Comment 5 matt jia 2023-01-23 23:27:18 UTC
(In reply to Brad Buckingham from comment #2)
> Does this only apply to the jdk rpm described or any rpm that has been
> imported/uploaded?  Thanks!

Yes, only JDK rpms have the issue.

Comment 6 matt jia 2023-01-24 01:04:15 UTC
(In reply to Ian Ballou from comment #4)
> If the RPM isn't uploaded like Brad asked, is it called
> jdk1.8-1.8.0_361-fcs.x86_64.rpm or jdk-8u351-linux-x64.rpm in the upstream
> repository?
> 
> I'll put this on the Pulp component since Katello doesn't manage the RPM
> names of synced repositories. We have a similar issue reported elsewhere
> regarding uploaded RPMs, but that is also on the Pulp component at the
> moment.

The rpm name should be jdk1.8-2000:1.8.0_361-fcs.x86_64 and Oracle has jdk-8u351-linux-x64.rpm. During the import, Pulp2 seems to rename it to jdk1.8-1.8.0_361-fcs.x86_64.rpm whereas pulp3 does not. If I rename jdk-8u351-linux-x64.rpm to jdk1.8-2000:1.8.0_361-fcs.x86_64.rpm, pulp3 saves it as jdk1.8-1.8.0_361-fcs.x86_64.rpm. This is the same as pulp2 does. Now I am able to install the jdk on a host:

yum install jdk1.8
...
Running transaction
  Installing : 2000:jdk1.8-1.8.0_361-fcs.x86_64                                                                                                                                                               1/1
Unpacking JAR files...
	tools.jar...
	plugin.jar...
	javaws.jar...
	deploy.jar...
	rt.jar...
	jsse.jar...
	charsets.jar...
	localedata.jar...
Loaded plugins: product-id, subscription-manager
  Verifying  : 2000:jdk1.8-1.8.0_361-fcs.x86_64                                                                                                                                                               1/1

Installed:
  jdk1.8.x86_64 2000:1.8.0_361-fcs

Maybe this is a doc bug?

Comment 7 Ian Ballou 2023-01-24 17:38:55 UTC
(In reply to matt jia from comment #6)

> The rpm name should be jdk1.8-2000:1.8.0_361-fcs.x86_64 and Oracle has
> jdk-8u351-linux-x64.rpm. During the import, Pulp2 seems to rename it to
> jdk1.8-1.8.0_361-fcs.x86_64.rpm whereas pulp3 does not. If I rename
> jdk-8u351-linux-x64.rpm to jdk1.8-2000:1.8.0_361-fcs.x86_64.rpm, pulp3 saves
> it as jdk1.8-1.8.0_361-fcs.x86_64.rpm. This is the same as pulp2 does.

I'm a little confused -- so in the upstream repository, the RPM is named jdk-8u351-linux-x64.rpm.  However, this name is wrong in some way? Curious what denotes the proper name of jdk1.8-2000:1.8.0_361-fcs.x86_64. Would it be in the repodata, or perhaps the inner metadata of the RPM itself?

Also, how are you renaming the RPM? Are you pulling it down, changing the name, and the reuploading it to Katello?

If the RPM name is wrong I suppose the upstream repository is at fault, but it's interesting that Pulp 2 corrects it where Pulp 3 does not.

@dalley I'm curious what you think about this issue.

Comment 8 matt jia 2023-01-24 21:32:15 UTC
(In reply to Ian Ballou from comment #7)
> 
> I'm a little confused -- so in the upstream repository, the RPM is named
> jdk-8u351-linux-x64.rpm.  However, this name is wrong in some way? Curious
> what denotes the proper name of jdk1.8-2000:1.8.0_361-fcs.x86_64. Would it
> be in the repodata, or perhaps the inner metadata of the RPM itself?

When downloading it from Oracle, the file name is jdk-8u351-linux-x64.rpm. I think the rpm spec file has the correct name jdk1.8-2000:1.8.0_361-fcs.x86_64 and this is what pulp uses during the import.
> 
> Also, how are you renaming the RPM? Are you pulling it down, changing the
> name, and the reuploading it to Katello?

I just simply:

mv jdk-8u351-linux-x64.rpm jdk1.8-2000:1.8.0_361-fcs.x86_64

Comment 9 matt jia 2023-02-02 00:58:59 UTC
Another customer's hitting this issue with the splunkforwarder rpm:

splunkforwarder-9.0.3-dd0128b1f8cd-linux-2.6-x86_64.rpm

Here is a mismatch. Satellite stores the rpm as in:


https://satellite.example.com/pulp/content/Default_Organization/Library/custom/Custom_product_for_3rd_party_repositories/splunk/Packages/s/splunkforwarder-9.0.3-dd0128b1f8cd-linux-2.6-x86_64.rpm


but the package name is somehow changed to splunkforwarder-9.0.3-dd0128b1f8cd.x86_64. When installing this package on a host, a 404 is raised as in:

[MIRROR] splunkforwarder-9.0.3-dd0128b1f8cd.x86_64.rpm: Status code: 404 for https://satellite.example.com/pulp/content/Default_Organization/Library/splunk/custom/Custom_product_for_3rd_party_repositories/splunk/Packages/s/splunkforwarder-9.0.3-dd0128b1f8cd.x86_64.rpm (IP: 10.64.30.30)

Comment 17 Daniel Alley 2023-02-23 06:21:25 UTC
Marking this as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2161993

*** This bug has been marked as a duplicate of bug 2161993 ***