Bug #21316
closedDeleting repository from product leaves product in Candlepin database
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.
Updated by Eric Helms over 7 years ago
- Assignee set to Justin Sherrill
- Translation missing: en.field_release set to 250
Updated by Justin Sherrill over 7 years ago
- Status changed from New to Needs design
Updated by Andrew Kofink about 7 years ago
- Translation missing: en.field_release deleted (
250)
Updated by Justin Sherrill about 7 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.