Actions
Issue #8843
closedExport list fails with 500 when a repository is deleted
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 104
Quarter:
Description
Steps to reproduce:
- create a repository
- create an exporter with that repository
- export with the exporter
- delete the repository
- list the exports of the exporter
Relevant part of the stack trace:
File "/home/vagrant/devel/pulpcore/pulpcore/app/serializers/exporter.py", line 73, in to_representation
viewset = get_viewset_for_model(exported_resource.content_object)
File "/home/vagrant/devel/pulpcore/pulpcore/app/util.py", line 23, in get_viewset_for_model
model_class = model_obj._meta.model
AttributeError: 'NoneType' object has no attribute '_meta'
Updated by daviddavis almost 3 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 97
Updated by ipanova@redhat.com over 2 years ago
- Sprint changed from Sprint 101 to Sprint 102
Updated by lmjachky over 2 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to lmjachky
Updated by lmjachky over 2 years ago
I was not able to reproduce the error. Have you experienced this erroneous behaviour in a particular plugin?
(pulp) [vagrant@pulp3-source-fedora33 ~]$ pulp file repository create --name foo
{
"pulp_href": "/pulp/api/v3/repositories/file/file/643a276d-9707-4838-b566-bdb082e12236/",
"pulp_created": "2021-08-30T20:26:51.230922Z",
"versions_href": "/pulp/api/v3/repositories/file/file/643a276d-9707-4838-b566-bdb082e12236/versions/",
"pulp_labels": {},
"latest_version_href": "/pulp/api/v3/repositories/file/file/643a276d-9707-4838-b566-bdb082e12236/versions/0/",
"name": "foo",
"description": null,
"retain_repo_versions": null,
"remote": null,
"autopublish": false,
"manifest": "PULP_MANIFEST"
}
(pulp) [vagrant@pulp3-source-fedora33 ~]$ pulp exporter pulp create --name foo-exporter --path /tmp/exporter/ --repository file:file:foo
{
"pulp_href": "/pulp/api/v3/exporters/core/pulp/57a11840-0004-48f1-82f1-bfd646db046b/",
"pulp_created": "2021-08-30T20:26:59.610987Z",
"name": "foo-exporter",
"path": "/tmp/exporter/",
"repositories": [
"/pulp/api/v3/repositories/file/file/643a276d-9707-4838-b566-bdb082e12236/"
],
"last_export": null
}
(pulp) [vagrant@pulp3-source-fedora33 ~]$ pulp export pulp run --exporter foo-exporter
Started background task /pulp/api/v3/tasks/bb4f678b-9e20-40b4-8b5a-bf71a26df3da/
Done.
{
"pulp_href": "/pulp/api/v3/exporters/core/pulp/57a11840-0004-48f1-82f1-bfd646db046b/exports/0a528831-3721-4711-ba04-55d4c3373853/",
"pulp_created": "2021-08-30T20:27:15.140012Z",
"task": "/pulp/api/v3/tasks/bb4f678b-9e20-40b4-8b5a-bf71a26df3da/",
"exported_resources": [
"/pulp/api/v3/repositories/file/file/643a276d-9707-4838-b566-bdb082e12236/versions/0/"
],
"params": {
"full": true
},
"output_file_info": {
"/tmp/exporter/export-0a528831-3721-4711-ba04-55d4c3373853-20210830_2027.tar.gz": "814f3cc87172494be9b761fc813d6e955a1e8ca4fa5d31c2bd6adc581230b1f6",
"/tmp/exporter/export-0a528831-3721-4711-ba04-55d4c3373853-20210830_2027-toc.json": "0594ff94a463f620ab665568b99e01c5890302984e1df86bceebbab2a0e9a0c7"
},
"toc_info": {
"file": "/tmp/exporter/export-0a528831-3721-4711-ba04-55d4c3373853-20210830_2027-toc.json",
"sha256": "0594ff94a463f620ab665568b99e01c5890302984e1df86bceebbab2a0e9a0c7"
}
}
(pulp) [vagrant@pulp3-source-fedora33 ~]$ pulp file repository destroy --name foo
Started background task /pulp/api/v3/tasks/a9c68a01-c86a-4713-bc26-03942f50825e/
Done.
(pulp) [vagrant@pulp3-source-fedora33 ~]$ http :24817/pulp/api/v3/exporters/core/pulp/57a11840-0004-48f1-82f1-bfd646db046b/exports/
HTTP/1.1 200 OK
Access-Control-Expose-Headers: Correlation-ID
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 843
Content-Type: application/json
Correlation-ID: 65462e6b17a54df79d2f7dac6913d25d
Date: Mon, 30 Aug 2021 20:35:19 GMT
Referrer-Policy: same-origin
Server: gunicorn
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"exported_resources": [
null
],
"output_file_info": {
"/tmp/exporter/export-0a528831-3721-4711-ba04-55d4c3373853-20210830_2027-toc.json": "0594ff94a463f620ab665568b99e01c5890302984e1df86bceebbab2a0e9a0c7",
"/tmp/exporter/export-0a528831-3721-4711-ba04-55d4c3373853-20210830_2027.tar.gz": "814f3cc87172494be9b761fc813d6e955a1e8ca4fa5d31c2bd6adc581230b1f6"
},
"params": {
"full": true
},
"pulp_created": "2021-08-30T20:27:15.140012Z",
"pulp_href": "/pulp/api/v3/exporters/core/pulp/57a11840-0004-48f1-82f1-bfd646db046b/exports/0a528831-3721-4711-ba04-55d4c3373853/",
"task": "/pulp/api/v3/tasks/bb4f678b-9e20-40b4-8b5a-bf71a26df3da/",
"toc_info": {
"file": "/tmp/exporter/export-0a528831-3721-4711-ba04-55d4c3373853-20210830_2027-toc.json",
"sha256": "0594ff94a463f620ab665568b99e01c5890302984e1df86bceebbab2a0e9a0c7"
}
}
]
}
Updated by mdellweg over 2 years ago
It looks like this change replaced the line in the stack trace with something better:
https://pulp.plan.io/issues/9008 https://github.com/pulp/pulpcore/pull/1461
Updated by lmjachky over 2 years ago
- Status changed from ASSIGNED to CLOSED - NOTABUG
Actions