Actions
Issue #9420
closedPulp - Story #7832: [EPIC] As a user, I have Alternate Content Sources
catch 404 when non-exitent ACS id being refreshed
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 105
Quarter:
Description
$ http POST localhost:24817/pulp/api/v3/acs/file/file/6902401b-7d21-4f5a-b85d-06737b0bb05d/refresh/
HTTP/1.1 500 Internal Server Error
Access-Control-Expose-Headers: Correlation-ID
Connection: close
Content-Length: 145
Content-Type: text/html
Correlation-ID: 7cf47fb22a4f4992911a5146fca8528a
Date: Fri, 17 Sep 2021 11:27:09 GMT
Referrer-Policy: same-origin
Server: gunicorn
Vary: Cookie
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
<!doctype html>
<html lang="en">
<head>
<title>Server Error (500)</title>
</head>
<body>
<h1>Server Error (500)</h1><p></p>
</body>
</html>
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 pulpcore]$ pjournal
-- Logs begin at Thu 2021-09-16 13:48:29 UTC. --
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: File "/usr/local/lib/pulp/lib64/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: response = handler(request, *args, **kwargs)
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: File "/home/vagrant/devel/pulp_file/pulp_file/app/viewsets.py", line 216, in refresh
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: acs = AlternateContentSource.objects.get(pk=pk)
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: File "/usr/local/lib/pulp/lib64/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: return getattr(self.get_queryset(), name)(*args, **kwargs)
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: File "/usr/local/lib/pulp/lib64/python3.8/site-packages/django/db/models/query.py", line 435, in get
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: raise self.model.DoesNotExist(
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: pulpcore.app.models.acs.AlternateContentSource.DoesNotExist: AlternateContentSource matching query does not exist.
Sep 17 11:27:09 pulp2-nightly-pulp3-source-centos7.fluffy.example.com gunicorn[19831]: pulp [7cf47fb22a4f4992911a5146fca8528a]: 127.0.0.1 - admin [17/Sep/2021:11:27:09 +0000] "POST /pulp/api/v3/acs/file/file/6902401b-7d21-4f5a-b85d-06737b0bb05d/refresh/ HTTP/1.1" 500 145 "-" "HTTPie/2.5.0"
Actions
Check whether ACS exists before refreshing it.
closes #9420