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 2060651 - Cannot upload a package to a repository if the same package already exists in another repository, but is not downloaded
Summary: Cannot upload a package to a repository if the same package already exists in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.10.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.12.0
Assignee: Samir Jha
QA Contact: Cole Higgins
URL:
Whiteboard:
: 2060328 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-03 22:35 UTC by Joniel Pasqualetto
Modified: 2022-11-16 13:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:33:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34635 0 Normal Closed Cannot upload a package to a repository if the same package already exists in another repository, but is not downloaded 2022-03-31 15:52:30 UTC
Red Hat Issue Tracker SAT-9066 0 None None None 2022-09-20 20:14:42 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:01 UTC

Description Joniel Pasqualetto 2022-03-03 22:35:22 UTC
Description of problem:

Trying to manually upload a package to a repository (using hammer or directly via API) will fail if the package being uploaded exists in any repository, but it's not downloaded yet.

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

How reproducible:


Steps to Reproduce:
1. Sync a repository with policy "on demand". For example EPEL
2. Create a custom repository (different than EPEL)
3. Manually download any package from EPEL and try to upload it to the custom repository:

~~~
# wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/0/0ad-0.0.22-1.el7.x86_64.rpm
# hammer repository upload-content --id 88 --path /root/0ad-0.0.22-1.el7.x86_64.rpm
Could not upload the content:
  Task f97ecff1-9b11-4f76-97a1-0eeea168fc70: Katello::Errors::Pulp3Error: {'non_field_errors': [ErrorDetail(string='There is already a package with: arch=x86_64, checksum_type=sha256, epoch=0, name=0ad, pkgId=d7d709ff104a89b5f0de45688fdc31cef8d0ace274350b489151d035b977834c, release=1.el7, version=0.0.22.', code='invalid')]}
~~~

Actual results:
Upload fails.

Expected results:
Upload would work.

Additional info:

If the package exists and IS DOWNLOADED, the upload works just fine. It's enough to make a request to satellite so pulp will download it, and then try again:

~~~
# curl -o /dev/null -k https://satellite.example.com/pulp/content/DefaultOrganization/Library/custom/EPEL/epel7/Packages/0/0ad-0.0.22-1.el7.x86_64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3776k  100 3776k    0     0  5541k      0 --:--:-- --:--:-- --:--:-- 5537k
# hammer repository upload-content --id 88 --path /root/0ad-0.0.22-1.el7.x86_64.rpm
Successfully uploaded file '0ad-0.0.22-1.el7.x86_64.rpm'
~~~

Comment 1 Bryan Kearney 2022-03-22 20:05:08 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34635 has been resolved.

Comment 4 Pavel Moravec 2022-09-23 20:34:43 UTC
*** Bug 2060328 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2022-11-16 13:33:45 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 (Important: Satellite 6.12 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:8506


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