Project

Profile

Help

Issue #7440

Orphan cleanup does not remove distribution tree content

Added by daviddavis about 2 months ago. Updated 28 days ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 82
Quarter:

Description

Steps to reproduce

  1. Sync a repo with a distribution tree such as https://fixtures.pulpproject.org/rpm-distribution-tree/
  2. Delete the repo and run orphan cleanup
  3. Go to an endpoint such as /pulp/api/v3/content/rpm/packages/ and observe that there's still content in the database

I did some debugging and it turns out the subrepos are still in the database and they're holding on to content.

This came up while trying to update our pulp_rpm tests to use the new rpm-distribution-tree fixture. Content sticks around which presents a problem for later tests that try to upload content and then hit a duplicate error. See the test failures here: https://github.com/pulp/pulp_rpm/pull/1832


Related issues

Blocks RPM Support - Task #7040: The kickstart fixture doesn't include packages/errata/etcCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision d2dd79d0 View on GitHub
Added by ttereshc 29 days ago

Remove subrepos during distribution tree removal.

Cleanup orphaned subrepos in a migration.

closes #7440 https://pulp.plan.io/issues/7440 [nocoverage]

History

#1 Updated by daviddavis about 2 months ago

  • Description updated (diff)

#2 Updated by daviddavis about 2 months ago

  • Blocks Task #7040: The kickstart fixture doesn't include packages/errata/etc added

#3 Updated by daviddavis about 2 months ago

Talking with ttereshc, it sounds like the best solution is to add a post_delete hook to clean up subrepos and content for distribution trees.

#4 Updated by daviddavis about 2 months ago

I believe we also need a migration to clean up orphaned subrepos.

#5 Updated by ttereshc about 2 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
  • Sprint set to Sprint 80

#6 Updated by pulpbot about 2 months ago

  • Status changed from ASSIGNED to POST

#7 Updated by ttereshc about 2 months ago

  • Triaged changed from No to Yes

#8 Updated by rchan about 2 months ago

  • Sprint changed from Sprint 80 to Sprint 81

#9 Updated by rchan about 1 month ago

  • Sprint changed from Sprint 81 to Sprint 82

#10 Updated by ttereshc 29 days ago

  • Status changed from POST to MODIFIED

#11 Updated by ttereshc 29 days ago

  • Sprint/Milestone set to 3.7.0

#12 Updated by pulpbot 28 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF