Issue #5153
closedDeleting Repository does not delete *child* objects like distribution
Description
I deleted repositories on my pulp VM and ended up with distributions:
[vagrant@centos7-devel4 foreman]$ curl http://localhost:24817/pulp/api/v3/distributions/ansible/ansible/ -u admin:password | python -m json.tool
{
"count": 5,
"next": null,
"previous": null,
"results": [
{
"_created": "2019-07-10T16:01:23.769288Z",
"_href": "/pulp/api/v3/distributions/ansible/ansible/76c4c96d-f01f-487c-b6ea-ee6968c3c204/",
"base_path": "Default_Organization/Library/custom/product_test1/ans_coll1",
"base_url": "centos7-devel4.samir.example.com/pulp/content/Default_Organization/Library/custom/product_test1/ans_coll1",
"content_guard": null,
"name": "ans_coll1-26882",
"repository": null,
"repository_version": null
},
{
"_created": "2019-07-10T18:26:44.536368Z",
"_href": "/pulp/api/v3/distributions/ansible/ansible/55e846bd-bf98-4507-91d1-eeed67bdeae1/",
"base_path": "Default_Organization/Library/custom/product_test1/ans_col2",
"base_url": "centos7-devel4.samir.example.com/pulp/content/Default_Organization/Library/custom/product_test1/ans_col2",
"content_guard": null,
"name": "ans_col2-41790",
"repository": null,
"repository_version": null
},
{
"_created": "2019-07-10T18:27:56.147492Z",
"_href": "/pulp/api/v3/distributions/ansible/ansible/3a7f6175-781d-44f8-b066-85569c48623c/",
"base_path": "Default_Organization/Library/custom/product_test1/ans_col3",
"base_url": "centos7-devel4.samir.example.com/pulp/content/Default_Organization/Library/custom/product_test1/ans_col3",
"content_guard": null,
"name": "ans_col3-5227",
"repository": null,
"repository_version": null
},
{
"_created": "2019-07-17T20:16:01.540578Z",
"_href": "/pulp/api/v3/distributions/ansible/ansible/bbb3ecfa-84c2-402e-b657-b7c0e8f22ca6/",
"base_path": "Default_Organization/Library/custom/test_product_1/test_ans_collection_1",
"base_url": "centos7-devel4.samir.example.com/pulp/content/Default_Organization/Library/custom/test_product_1/test_ans_collection_1",
"content_guard": null,
"name": "test_ans_collection_1-11326",
"repository": null,
"repository_version": null
},
{
"_created": "2019-07-18T00:41:16.016404Z",
"_href": "/pulp/api/v3/distributions/ansible/ansible/9137a066-cf12-427b-8aa5-d94cce18b993/",
"base_path": "Default_Organization/Library/custom/test_product_1/test2",
"base_url": "centos7-devel4.samir.example.com/pulp/content/Default_Organization/Library/custom/test_product_1/test2",
"content_guard": null,
"name": "test2-23722",
"repository": null,
"repository_version": null
}
]
}
Notice that the repository and repository version are both null for all distributions. The delete_orphan task also did not clean this up.
I am using a slightly older version dues to some blocking setup issues. Below are the versions I am running:
"versions": [
{
"component": "pulpcore",
"version": "3.0.0rc4.dev0"
},
{
"component": "pulpcore-plugin",
"version": "0.1.0rc4.dev0"
},
{
"component": "pulp_docker",
"version": "4.0.0b6.dev0"
},
{
"component": "pulp_file",
"version": "0.1.0b1.dev0"
},
{
"component": "pulp_ansible",
"version": "0.2.0b1.dev0"
}
]
Updated by sajha almost 5 years ago
- Subject changed from Deleting Repository does not delete child objects like distribution to Deleting Repository does not delete *child* objects like distribution
Updated by daviddavis almost 5 years ago
- Project changed from Ansible Plugin to Pulp
Thanks for the bug report. Regarding distros, this is the intended behavior. Distributions don't require a repo/repo versions and therefore exist independently of a repository. So deleting a repo doesn't delete any attached distros. But I wonder if this is the correct behavior since you're not the first to report this as a bug.
The orphan cleanup task only cleans up content and artifacts. But maybe it should clean up distros?
Updated by amacdona@redhat.com almost 5 years ago
We are closing as NOTABUG since this is the currently intended behavior. However since it is surprising to at least some users, I'd encourage sajha (or anyone) start a discussion on pulp-list.
Updated by ipanova@redhat.com almost 5 years ago
- Status changed from NEW to CLOSED - NOTABUG
Updated by ggainey almost 4 years ago
- Tags Katello added
- Tags deleted (
Katello-P2)