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 2092039 - Content import fails if repo labels differ and repo is already imported
Summary: Content import fails if repo labels differ and repo is already imported
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.10.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.12.0
Assignee: Partha Aji
QA Contact: Radek Mynar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-31 15:21 UTC by Joniel Pasqualetto
Modified: 2023-11-24 14:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2112350 (view as bug list)
Environment:
Last Closed: 2022-11-16 13:33:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Hotfix RPM for Satellite 6.10.7 (9.30 MB, application/x-rpm)
2022-07-12 19:36 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34992 0 Normal Closed Content import fails if repo labels differ and repo is already imported 2022-06-20 17:20:59 UTC
Github Katello katello pull 10162 0 None Merged Fixes #34992 - Use content ID to verify if a redhat_repo already exists 2022-06-17 13:31:49 UTC
Red Hat Issue Tracker SAT-10752 0 None None None 2022-09-23 16:03:02 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:04 UTC

Description Joniel Pasqualetto 2022-05-31 15:21:27 UTC
Description of problem:

When repository labels between exporting and importing satellites don't match, the import process will fail with a conflict error if the repository being imported is already enabled (due to a previous import).

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

This issue only happens on Satellite 6.10.5+

How reproducible:

Always

Steps to Reproduce:
1. Ensure the exporting and importing Satellite has a mismatch in the label of a repository
2. Export the repository on exporting server
3. Import the repository on importing server
4. Export a version 2.0 of the repository (incremental or complete, doesn't matter)
5. Try importing version 2.0

Actual results:

Import of version 2.0 fails with a conflict:

~~~
 hammer content-import library --path /var/lib/pulp/imports/Org/Export-Library/2.0/2022-05-31T09-56-09-04-00/ --organization-id 1
Could not import the archive.:
  Error: 409 Conflict
~~~

Logs show a stacktrace like this:

~~~
2022-05-31T10:08:47 [E|app|a6c5fda2] Katello::Errors::ConflictException: The repository is already enabled
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.56/app/lib/actions/katello/repository_set/enable_repository.rb:15:in `plan'
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.9/lib/dynflow/action.rb:515:in `block (3 levels) in execute_plan'
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.9/lib/dynflow/middleware/stack.rb:27:in `pass'
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.9/lib/dynflow/middleware.rb:19:in `pass'
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.9/lib/dynflow/middleware.rb:36:in `plan'
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.9/lib/dynflow/middleware/stack.rb:23:in `call'
 a6c5fda2 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.9/lib/dynflow/middleware/stack.rb:27:in `pass'
~~~

Expected results:

Import should work and update the existing repository, instead of trying to enable it again

Additional info:

Comment 2 Bryan Kearney 2022-06-14 04:04:33 UTC
Upstream bug assigned to paji

Comment 3 Bryan Kearney 2022-06-14 04:04:35 UTC
Upstream bug assigned to paji

Comment 4 Bryan Kearney 2022-06-14 20:04:36 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34992 has been resolved.

Comment 5 wclark 2022-07-12 19:36:02 UTC
Created attachment 1896492 [details]
Hotfix RPM for Satellite 6.10.7

INSTALL INSTRUCTIONS:

1. Take a complete backup or snapshot of Satellite 6.10.7 server

2. Download the hotfix RPM attached to this BZ and copy it to Satellite server

3. # yum install ./tfm-rubygem-katello-4.1.1.60-3.HOTFIXRHBZ2092039.el7sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 6 Radek Mynar 2022-09-23 15:41:28 UTC
RH repositories can be imported even when export and import repo labels don't match.

VERIFIED with Satellite 6.12 SNAP10 @ RHEL8.6

Comment 10 errata-xmlrpc 2022-11-16 13:33:51 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.