Project

Profile

Help

Issue #4945

closed

Error thrown when fetching a task that created a distribution if CONTENT_HOST is not defined

Added by jsherril@redhat.com over 5 years ago. Updated over 4 years ago.

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

Description

The settings.py template (https://github.com/pulp/ansible-pulp/blob/master/roles/pulp/templates/settings.py.j2#L5-L7) in the installer makes it seem like CONTENT_HOST is optional, but if a user creates a distribution and polls the tasks, they will only get an ISE 500:

pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/tasks/15f3f04d-b917-4727-b964-024c81e454ab/
Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/viewsets.py", line 116, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 495, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 455, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 492, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/mixins.py", line 58, in retrieve
return Response(serializer.data)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 563, in data
ret = super(Serializer, self).data
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 262, in data
self._data = self.to_representation(self.instance)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 530, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/relations.py", line 542, in to_representation
for value in iterable
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/relations.py", line 542, in <listcomp>
for value in iterable
File "/usr/local/lib/pulp/src/pulpcore/pulpcore/app/serializers/task.py", line 25, in to_representation
return serializer.data.get('_href')
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 563, in data
ret = super(Serializer, self).data
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 262, in data
self._data = self.to_representation(self.instance)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 530, in to_representation
ret[field.field_name] = field.to_representation(attribute)
File "/usr/local/lib/pulp/src/pulpcore/pulpcore/app/serializers/fields.py", line 248, in to_representation
host.strip('/'),
AttributeError: 'NoneType' object has no attribute 'strip'
127.0.0.1 - admin [03/Jun/2019:13:59:01 +0000] "GET /pulp/api/v3/tasks/15f3f04d-b917-4727-b964-024c81e454ab/ HTTP/1.1" 500 27 "-" "OpenAPI-Generator/3.0.0rc2
pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/tasks/15f3f04d-b917-4727-b964-024c81e454ab/
Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)

Related issues

Related to Pulp - Issue #4946: pulp_content_host default value is set in the wrong ansible roleCLOSED - CURRENTRELEASEbmbouterActions

Also available in: Atom PDF