Project

General

Profile

Bug #34518

on content import failure for a repository the created version should be cleaned up

Added by Lucy Fu 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Inter Server Sync
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

hammer content-import repository failed and left behind a product and repository with no content.

Associated revisions

Revision dfacc815 (diff)
Added by Partha Aji 4 months ago

fixes #34518 - Content Import failure removes generated version (#9984)

  • fixes #34518 - Content Import failure removes generated version
  • Update app/models/katello/events/delete_latest_content_view_version.rb

History

#1 Updated by Partha Aji 4 months ago

During content-import the importing server creates a content-view-version and then tries to import the content into pulp. If the pulp import fails the task errors out. The user then has to remove the content view version and try importing again. Generated content views like repo import based content views will not be visible to the user. So it is not possible for the user to delete the version even if they want to.
On import failure we should instead be just deleting the useless content view version automatically.

Steps to Reproduce:
1. Start a content-view version import task
2. make the import task fail unexpectedly (kill the worker importing it, for example)
3. Notice that the task errors out with a warning
4. Go to Content => Content Views - Content View details of the importing content view
Actual:
5. Notice that a new content view version got created even though it has no content
6. Try importing again and you notice an error message along the lines of
"""
Content View Version specified in the metadata - '<my content view> 2.0' already exists. If you wish to replace the existing version, delete '<my content view> 2.0' and try import again.
"""

Expected:
No version created. Since the import did not succeed the generate version should automatically get deleted.

#2 Updated by Partha Aji 4 months ago

  • Bugzilla link set to 2058905

#3 Updated by The Foreman Bot 4 months ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9984 added

#4 Updated by Samir Jha 4 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.5.0

#5 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases Katello 4.5.0 added

#6 Updated by Partha Aji 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF