Project

Profile

Help

Issue #2012

closed

alternate content source refresh fails with json serialization error

Added by mhrivnak over 8 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.8.4
Platform Release:
2.8.6
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 4
Quarter:

Description

When an alternate content source is defined, an error like this one will be seen in the log:

pulp.server.content.sources.model:ERROR: Refresh [XXXXX] url: http://zfs1.virt/pulp/content/beta/rhel/server/7/x86_64/sat-tools/6/os/, failed: <mongoengine.fields.StringField object at 0x3118510> is not JSON serializable

User Billy Holmes, who originally reported the issue, suggested this patch:

--- /usr/lib/python2.7/site-packages/pulp_rpm/plugins/catalogers/yum.py    2016-04-19 17:54:46.000000000 -0400
+++ /usr/lib/python2.7/site-packages/pulp_rpm/plugins/catalogers/yum.py.new    2016-05-05 01:15:39.220012053 -0400
@@ -50,8 +50,9 @@
                 fp, primary.PACKAGE_TAG, primary.process_package_element)
             for model in _packages:
                 unit_key = model.unit_key
+                type_id = model._content_type_id
                 url = urljoin(base_url, model.download_path)
-                conduit.add_entry(models.RPM._content_type_id, unit_key, url)
+                conduit.add_entry(type_id, unit_key, url)
         finally:
             fp.close()

Related issues

Related to Packaging - Task #2083: Issues common to 2.9.1 and 2.8 streamCLOSED - NOTABUGsemyers

Actions

Also available in: Atom PDF