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 2058905 - Content Import does not delete version on failure
Summary: Content Import does not delete version on failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.11.0
Assignee: Partha Aji
QA Contact: Radek Mynar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-26 20:06 UTC by Partha Aji
Modified: 2023-11-06 08:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2075031 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:34:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34518 0 Normal New on content import failure for a repository the created version should be cleaned up 2022-02-26 20:09:34 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:34:15 UTC

Description Partha Aji 2022-02-26 20:06:10 UTC
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. Re-import should work with no errors.

Comment 1 Partha Aji 2022-02-26 20:09:34 UTC
Connecting redmine issue https://projects.theforeman.org/issues/34518 from this bug

Comment 2 Bryan Kearney 2022-02-27 00:05:47 UTC
Upstream bug assigned to paji

Comment 3 Bryan Kearney 2022-02-27 00:05:49 UTC
Upstream bug assigned to paji

Comment 5 Radek Mynar 2022-04-29 14:14:35 UTC
I prepared complete and incremental exports of few Content View versions. Then I tried to import them and killed the import task (kill pulpcore-worker). Approptiate CV version was created when import started and removed after import task failed. Re-import of CVs was successful. 

VERIFIED with Satellite 6.11 SNAP 17.0 @ RHEL8.5

Comment 8 errata-xmlrpc 2022-07-05 14:34:01 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 (Moderate: Satellite 6.11 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:5498


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