Project

Profile

Help

Issue #4945

Updated by jsherril@redhat.com almost 5 years ago

While doing some work, i made it such that /var/lib/pulp/published/metadata/ could NOT be created by the pulp server (/var/lib/pulp/published was owned by apache).    The settings.py template task failed (which is fine, i'd expect that), but the task also could not be fetched.   


 Steps to reproduce: 
 1.    (https://github.com/pulp/ansible-pulp/blob/master/roles/pulp/templates/settings.py.j2#L5-L7) Delete /var/lib/pulp/published/metadata/ on a pulp3 installation 
 2.    in Make sure the installer makes it seem like CONTENT_HOST is optional, but if a pulp user creates cannot write to /var/lib/pulp/published/ 
 3.    try to create a distribution and polls 
 4.    Poll the tasks, they will only get an ISE 500: task from step 3) until you start getting 500 ISEs  



 Attempting to fetch it threw: 

 <pre> 
 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) 

 </pre>

Back