Project

General

Profile

Actions

Bug #34992

closed

Content import fails if repo labels differ and repo is already imported

Added by Joniel Pasqualetto over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Inter Server Sync
Target version:

Description

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:

Actions #1

Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/10139 added
Actions #2

Updated by Jeremy Lenz over 2 years ago

  • Category set to Inter Server Sync
  • Target version set to Katello 4.5.0
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/Katello/katello/pull/10161 added
Actions #4

Updated by The Foreman Bot over 2 years ago

  • Assignee set to Partha Aji
  • Pull request https://github.com/Katello/katello/pull/10162 added
Actions #5

Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases Katello 4.5.1 added
Actions #6

Updated by Partha Aji over 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/Katello/katello/pull/10186 added
Actions

Also available in: Atom PDF