Project

General

Profile

Actions

Bug #21316

closed

Deleting repository from product leaves product in Candlepin database

Added by John Beranek over 6 years ago. Updated almost 6 years ago.

Status:
Rejected
Priority:
Normal
Category:
Repositories
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I was tidying my Katello 3.4.5 installation, deleting old no longer used repositories, and the first repository deleted fine, but when I tried to delete the next one, it got stuck halfway through the deletion with a Candlepin error about the product referring to the repository I just deleted. This was:

Katello::Errors::CandlepinError: Runtime Error product references content which does not exist: ContentData [id: 1481545184271, name: CentOS-7.3-x86_64-extras, label: Acme_Corp_CentOS_CentOS-7_3-x86_64-extras] at org.candlepin.controller.ProductManager.applyProductChanges:658

Looking at the Candlepin DB I found that this repository was still referred to in cp_content:

e3e38602bba447dba0e2bf398b13b3a0 | 1481545184271 | 2016-12-12 12:19:44.271+00 | 2016-12-12 12:19:44.271+00 | /custom/CentOS/CentOS-7_3-x86_64-extras | | Acme_Corp_CentOS_CentOS-7_3-x86_64-extras | 1 | CentOS-7.3-x86_64-extras | | | yum | Custom | | | 0
but this repository had already been removed from Pulp.

So, it looks like the repository deletion isn't fully completing for some reason.

Actions #1

Updated by Eric Helms over 6 years ago

  • Assignee set to Justin Sherrill
  • translation missing: en.field_release set to 250
Actions #2

Updated by Justin Sherrill over 6 years ago

  • Status changed from New to Needs design
Actions #3

Updated by Andrew Kofink over 6 years ago

  • translation missing: en.field_release deleted (250)
Actions #4

Updated by Justin Sherrill about 6 years ago

  • Status changed from Needs design to Rejected
  • translation missing: en.field_release set to 166

Thanks for reporting this. I finally had some time to look into this and I looked at the latest release (3.5). This release uses candlepin 2.Y and the behavior is a tad different. After deleting a repo the entry in cp2_content is still present, however every week a cleanup job runs that deletes it (on sundays).

I tested this by triggering the job manually and it ran fine and deleted the entry. Its possible this was a bug in 3.4, but it looks to be now fixed.

Actions

Also available in: Atom PDF