Bug #34518
closedon content import failure for a repository the created version should be cleaned up
Description
hammer content-import repository failed and left behind a product and repository with no content.
Updated by Partha Aji over 2 years 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.
Updated by The Foreman Bot over 2 years ago
- Status changed from New to Ready For Testing
- Assignee set to Partha Aji
- Pull request https://github.com/Katello/katello/pull/9984 added
Updated by Samir Jha over 2 years ago
- Target version set to Katello 4.5.0
- Triaged changed from No to Yes
Updated by The Foreman Bot over 2 years ago
- Fixed in Releases Katello 4.5.0 added
Updated by Partha Aji over 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|dfacc81503e66aab70bb2131a25297f50ba611b6.