Project

Profile

Help

Issue #8546

closed

500 error when updating a repository

Added by daviddavis almost 2 years ago. Updated over 1 year ago.

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

Description

Steps to reproduce

CLI

pulp rpm repository create --name rblack
pulp rpm repository update --name rblack --description friday

httpie

http :/pulp/api/v3/repositories/rpm/rpm/ name=rblack
http PATCH :/pulp/api/v3/repositories/rpm/rpm/d54f03f8-8283-4f01-b886-e4c8eb4e31fe/ description=friday

Error

pulp [a10114b6cf174bf59fc138290f8725dd]: django.request:ERROR: Internal Server Error: /pulp/api/v3/repositories/rpm/rpm/789fdeeb-c6ec-4965-a4ec-c725e6f1c088/
Traceback (most recent call last):
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/pulp/lib64/python3.7/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.7/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.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/viewsets.py", line 125, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/vagrant/devel/pulpcore/pulpcore/app/viewsets/base.py", line 465, in partial_update
    return self.update(request, *args, **kwargs)
  File "/home/vagrant/devel/pulpcore/pulpcore/app/viewsets/base.py", line 449, in update
    serializer.is_valid(raise_exception=True)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 220, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 422, in run_validation
    value = self.validate(value)
  File "/home/vagrant/devel/pulp_rpm/pulp_rpm/app/serializers/repository.py", line 108, in validate
    data["metadata_checksum_type"] not in settings.ALLOWED_CONTENT_CHECKSUMS
KeyError: 'metadata_checksum_type'
Actions #1

Updated by daviddavis almost 2 years ago

  • Description updated (diff)
Actions #2

Updated by dalley almost 2 years ago

@daviddavis, do you know when this was introduced? Would it need a backport?

Actions #3

Updated by pulpbot almost 2 years ago

  • Status changed from NEW to POST

Added by daviddavis almost 2 years ago

Revision 9a91832a

Fix 500 error when updating a repository.

fixes #8546

[nocoverage]

Actions #4

Updated by daviddavis almost 2 years ago

  • Status changed from POST to MODIFIED
Actions #5

Updated by ttereshc over 1 year ago

  • Sprint/Milestone set to 3.12.0
Actions #6

Updated by pulpbot over 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF