Project

Profile

Help

Issue #6565

pulp_rpm remote partial_update server error

Added by jdjeffers 4 months ago. Updated 3 months ago.

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

Description

While attempting a partial_update to an rpm remote, I encountered the follow error:

remote_options
{:tls_validation=>false, :name=>"2_duplicate", :url=>"http://myrepo.com", :proxy_url=>nil, :client_cert=>"KJL:KDF*(DF&*(*$&(*\#$JLKJD(D((D", :client_key=>"KJL:KDF*(DF&*(*$&(*\#$JLKJD(D((D", :ca_cert=>"KJL:KDF*(DF&*(*$&(*\#$JLKJD(D((D", :policy=>"immediate"}
remote_href
"/pulp/api/v3/remotes/rpm/rpm/a13273cd-fe24-4e1c-aaf8-52f19d69b06c/"
 
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/remotes/rpm/rpm/9ce95563-a304-4d91-aacc-e6030bb37313/
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: Traceback (most recent call last):
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: response = get_response(request)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: response = self.process_exception_by_middleware(e, request)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: return view_func(*args, **kwargs)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/viewsets.py", line 114, in view
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: return self.dispatch(request, *args, **kwargs)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: response = self.handle_exception(exc)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: self.raise_uncaught_exception(exc)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: raise exc
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: response = handler(request, *args, **kwargs)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/local/lib/python3.6/site-packages/pulpcore/app/viewsets/base.py", line 405, in partial_update
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: return self.update(request, *args, **kwargs)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/local/lib/python3.6/site-packages/pulpcore/app/viewsets/base.py", line 392, in update
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: serializer.is_valid(raise_exception=True)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/serializers.py", line 235, in is_valid
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: self._validated_data = self.run_validation(self.initial_data)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/serializers.py", line 430, in run_validation
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: value = self.to_internal_value(data)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/serializers.py", line 487, in to_internal_value
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: validated_value = field.run_validation(primitive_value)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/fields.py", line 796, in run_validation
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: return super().run_validation(data)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/lib/python3.6/site-packages/rest_framework/fields.py", line 542, in run_validation
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: value = self.to_internal_value(data)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/local/lib/python3.6/site-packages/pulpcore/app/serializers/fields.py", line 382, in to_internal_value
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: current_hash = self.to_representation(current_value)
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: File "/usr/local/lib/python3.6/site-packages/pulpcore/app/serializers/fields.py", line 376, in to_representation
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: return hashlib.sha256(bytes(value, 'utf-8')).hexdigest()
Apr 23 17:15:05 centos7-katello-devel-stable pulpcore-api: TypeError: encoding without a string argument

Server details:

{
  "versions": [
    {
      "component": "pulpcore",
      "version": "3.4.0.dev0"
    },
    {
      "component": "pulp_2to3_migration",
      "version": "0.2.0b2"
    },
    {
      "component": "pulp_rpm",
      "version": "3.4.0b1.dev0"
    },
    {
      "component": "pulp_file",
      "version": "0.4.0.dev0"
    },
    {
      "component": "pulp_container",
      "version": "1.3.0.dev0"
    }
  ],
  "online_workers": [
    {
      "pulp_created": "2020-04-23T13:28:35.117471Z",
      "pulp_href": "/pulp/api/v3/workers/6f81e3f6-9cc7-4022-ac8c-072804249a25/",
      "name": "26457@centos7-katello-devel-stable.example.com",
      "last_heartbeat": "2020-04-23T18:30:34.304308Z"
    },
    {
      "pulp_created": "2020-04-23T13:28:34.728252Z",
      "pulp_href": "/pulp/api/v3/workers/0113b815-d536-43e2-99c2-950fb48ec813/",
      "name": "resource-manager",
      "last_heartbeat": "2020-04-23T18:30:33.798729Z"
    },
    {
      "pulp_created": "2020-04-23T13:28:34.861116Z",
      "pulp_href": "/pulp/api/v3/workers/e209751b-cac6-4582-a017-bf0c681c2a48/",
      "name": "26459@centos7-katello-devel-stable.example.com",
      "last_heartbeat": "2020-04-23T18:30:32.385819Z"
    }
  ],
  "online_content_apps": [
    {
      "name": "26484@centos7-katello-devel-stable.example.com",
      "last_heartbeat": "2020-04-23T18:30:37.746262Z"
    },
    {
      "name": "26485@centos7-katello-devel-stable.example.com",
      "last_heartbeat": "2020-04-23T18:30:37.748275Z"
    }
  ],
  "database_connection": {
    "connected": true
  },
  "redis_connection": {
    "connected": true
  },
  "storage": {
    "total": 37558423552,
    "used": 8867332096,
    "free": 28691091456
  }
}

ruby client gem versions: pulp_2to3_migration_client (0.2.0b2.dev01587578581) pulp_ansible_client (0.2.0b12.dev01587596219) pulp_container_client (1.2.0) pulp_file_client (0.2.0) pulp_rpm_client (3.3.0b2.dev01587561142) pulpcore_client (3.2.1)

Associated revisions

Revision 8c6d01da View on GitHub
Added by ipanova@redhat.com 3 months ago

Fixed partial and general update calls.

closes #6565 https://pulp.plan.io/issues/6565

Revision b8a33254 View on GitHub
Added by ipanova@redhat.com 3 months ago

Fixed partial and general update calls.

closes #6565 https://pulp.plan.io/issues/6565

(cherry picked from commit 8c6d01daedb0b731e8f1d67c3497d55eb1b563cd)

History

#1 Updated by jsherril@redhat.com 3 months ago

  • Project changed from RPM Support to Pulp
  • Tags Katello-P1 added

moving this to core as file is also affected

#2 Updated by ipanova@redhat.com 3 months ago

Issue happens specifically happens when ca_cert and key are used in the partial update, even in general update

https://github.com/pulp/pulpcore/blob/master/pulpcore/app/serializers/fields.py#L383

#3 Updated by ipanova@redhat.com 3 months ago

  1. create a remote without client_key
  2. PUT/PATCH remote with client_key
  3. observe 500

#4 Updated by pulpbot 3 months ago

  • Status changed from NEW to POST

#5 Updated by ipanova@redhat.com 3 months ago

  • Assignee set to ipanova@redhat.com
  • Sprint set to Sprint 71

#6 Updated by rchan 3 months ago

  • Sprint changed from Sprint 71 to Sprint 72

#7 Updated by jsherril@redhat.com 3 months ago

can we get this in a 3.3.1?

#8 Updated by ipanova@redhat.com 3 months ago

  • Status changed from POST to MODIFIED

#11 Updated by daviddavis 3 months ago

  • Sprint/Milestone set to 3.3.1

#12 Updated by daviddavis 3 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#13 Updated by ggainey 3 months ago

  • Tags Katello added
  • Tags deleted (Katello-P1)

Please register to edit this issue

Also available in: Atom PDF