Bug #34992
closedContent import fails if repo labels differ and repo is already imported
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:
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
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
Updated by The Foreman Bot over 2 years ago
- Pull request https://github.com/Katello/katello/pull/10161 added
Updated by The Foreman Bot over 2 years ago
- Assignee set to Partha Aji
- Pull request https://github.com/Katello/katello/pull/10162 added
Updated by The Foreman Bot over 2 years ago
- Fixed in Releases Katello 4.5.1 added
Updated by Partha Aji over 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|26e1a5e316c654f6e651974eb31e8c56e967c5a9.
Updated by The Foreman Bot over 2 years ago
- Pull request https://github.com/Katello/katello/pull/10186 added