Project

Profile

Help

Issue #5161

closed

Removing manifest_lists from a repository does not purge all newly unlinked manifests

Added by amacdona@redhat.com over 5 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
Platform Release:
2.21.0
Target Release - Docker:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 56
Quarter:

Description

To reproduce:
1. Sync busybox
2. Create a new repo foo
3. add all manifest_lists from busybox to foo
4. remove all manifest lists from foo
5. check content unit counts, some manifests (and their referenced blobs) are still in foo

The problem occurs when removing 2 or more manifest_lists at the same time that reference the same manifests.

Manifest List A:
Manifest 1, 2, 3
Manifest LIst B:
Manifest 2, 3, 4

After adding AB then removing AB, Manifests 2, 3 will remain in the repo.

If removing the manifest_lists 1 at a time, no manifests remain in the repo (expected).

The faulty query is here:
https://github.com/pulp/pulp_docker/blob/2-master/plugins/pulp_docker/plugins/importers/importer.py#L501-L502

Unit filter should actually be:
unit_filters={'digest': {'$nin': [list, of, all, manifest_lists, being, removed]}}

This problem was discovered as a discrepency between a fix for https://pulp.plan.io/issues/4549 and the code on 2-master, and will be fixed in the same commit.


Related issues

Related to Docker Support - Issue #4549: Removing docker manifests from a docker repository takes a long timeCLOSED - CURRENTRELEASEamacdona@redhat.comActions

Also available in: Atom PDF