Project

General

Profile

Actions

Bug #35549

closed

Unable to "Remove" a repository directly if the repo is part of a CV as well as CCV in Satellite 6.12

Added by Samir Jha about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2123932

Description of problem:

Satellite 6.11 has introduced a very nice feature where if "Allow deleting repositories in published content views" is enabled in settinfs, that allows to delete (not disable) any repos ( Redhat\Custom ) from Satellite even if they are part of any CVs i.e. if we delete any repos using Content --> Products --> <Repo> --> Select Action --> Remove Repository , Then It will delete all reference of the repo from all related CVs and will work fine.

It sounds dengerous but It works great and does not breaks the CVs at all.

Now this feature works great if we are only expecting the CV to be present in Component Content Views i.e. normal CVs. But if the same repo is present in a CCV as well, Then one of the deletion attempts at the backend will fail with error:
~
Task 9e9edf11-ecd0-4fc5-9b71-936fb3b68f9c: RuntimeError: Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it.
~

Version-Release number of selected component (if applicable):

Satellite 6.12 ( I never tested on 6.11 but Hopefully it is reproducible there as well )

How reproducible:

Always

Steps to Reproduce:
1. Install a Satellite 6.12
2. Import a manifest
3. Enable any three rhel repos and sync them ( take satellite-clients i guess )
4. Create an environment path by name "Test" after "Library" lifecycle.
5. Create a CV by name TCV1, include any two out of three repos there and Publish it to Library
6. Create another CV by name TCV2, include the last remaining repos in that CV and Publish it to Library
7. Create a CCV by name TCCV, include the latest versions of TCV1 and TCV2 in the TCCV and Publish to Library.
8. Republish a new version of the TCCV and force publish+promote it to Library as well as "Test" environment.
9. Go to Content --> Products --> Click open a product --> Click open one of the repos --> Select Action --> Remove Repository

Actual results:

Three tasks will be generated. Out of all, two will be successful ( which are related to repo instances from CV ) but one task will go to Paused state ( which is related to the main repo ) and throw the error:

Task 9e9edf11-ecd0-4fc5-9b71-936fb3b68f9c: RuntimeError: Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it.

I believe this is happening as the CCV-related instance of the repo never got deleted i.e. The action only deleted the Pulp IDs from CVs and then straightaway tried to delete the main repo but It left the CCV untouched.

Expected results:

The feature should properly work when the repos are part of CCV as well.

Additional info:

Logs will be attached later.

Actions #1

Updated by The Foreman Bot about 2 years ago

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

Updated by Samir Jha about 2 years ago

  • Subject changed from Unable to "Remove" a repository directly if the repo is part of a CV as well as CCV in Satellite 6.12 to Unable to "Remove" a repository directly if the repo is part of a CV as well as CCV in Satellite 6.12
  • Target version set to Katello 4.7.0
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases Katello 4.7.0 added
Actions #4

Updated by Samir Jha about 2 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF