Project

Profile

Help

Issue #4867

closed

rpm distribution not deleted when deleting a repo with pulp3

Added by jcabrera over 5 years ago. Updated over 4 years ago.

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

Description

Used version:

pulp_source_dir: "git+https://github.com/pulp/pulpcore.git@3.0.0rc2"
pulp_plugin_source_dir: "git+https://github.com/pulp/pulpcore-plugin.git@0.1.0rc2"
pulp-rpm:
app_label: "rpm"
source_dir: "git+https://github.com/pulp/pulp_rpm.git@3.0.0b3"

When removing a repository, the publication(s) that depends on it are removed but that the distribution that depends on the publication is still there.

Example
- After doing all steps in the documentation [1], when deleting the repo

[vagrant@dev-pulp-server ~]$ http DELETE $PORT$REPO_HREF
HTTP/1.1 202 Accepted
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Connection: close
Content-Length: 67
Content-Type: application/json
Date: Wed, 22 May 2019 14:05:42 GMT
Server: gunicorn/19.9.0
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "task": "/pulp/api/v3/tasks/d5e34bc4-f9fc-4184-b991-7619a888a57b/"
}

The distribution is still there but with "publication": null

[vagrant@dev-pulp-server ~]$ http $PORT/pulp/api/v3/distributions/rpm/rpm/
HTTP/1.1 200 OK
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 308
Content-Type: application/json
Date: Wed, 22 May 2019 14:05:47 GMT
Server: gunicorn/19.9.0
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "_created": "2019-05-22T14:04:14.749447Z",
            "_href": "/pulp/api/v3/distributions/rpm/rpm/2b2ad506-1ea4-48ec-8406-d941554ca54e/",
            "base_path": "foo",
            "base_url": "dev-pulp-server.ptci.dev:8080/pulp/content/foo",
            "content_guard": null,
            "name": "baz",
            "publication": null
        }
    ]
}

The publication has been removed:

[vagrant@dev-pulp-server ~]$ http $PORT/pulp/api/v3/publications/rpm/rpm/
HTTP/1.1 200 OK
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 52
Content-Type: application/json
Date: Wed, 22 May 2019 14:06:17 GMT
Server: gunicorn/19.9.0
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "count": 0,
    "next": null,
    "previous": null,
    "results": []
}
</per>

[1] https://pulp-rpm.readthedocs.io/en/latest/workflows/create_sync_publish.html#

Related issues

Related to Pulp - Issue #4840: Prevent users from creating publication distributions without a publicationCLOSED - WONTFIXActions

Also available in: Atom PDF