Project

Profile

Help

Issue #1239

closed

Refactor #765: Convert Pulp to use MongoEngine

Pulp FileDistributor base class raises exception when operating on mongoengine based unit

Added by bmbouter about 9 years ago. Updated over 5 years ago.

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

Description

If you have a mongoengine converted unit type, you cannot publish it using the platform's FileDistributor even if the plugin's subclass of FileDistributor has been correctly implemented. For example if platform is at HEAD of master, and you test against the in-development puppet conversion to mongoengine then you can run the following commands to cause this failure using a mixture of pulp-admin and httpie:

pulp-admin -u admin -p admin puppet repo create --repo-id=zoo-puppet --feed=http://forge.puppetlabs.com --queries torssh
pulp-admin puppet repo sync run --repo-id zoo-puppet
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo-puppet/distributors/ distributor_type_id=puppet_file_distributor distributor_id=asdf
http --verify no --auth admin:admin POST https://localhost/pulp/api/v2/repositories/zoo-puppet/actions/publish/ id='asdf

You'll see the following traceback in the celery worker running the publish for distributor=asdf:

Exception from server requesting all content units for repository [zoo-puppet]
Traceback (most recent call last):
  File "/home/bmbouter/Documents/pulp/server/pulp/plugins/conduits/mixins.py", line 716, in do_get_repo_units
    return list(_transfer_object_generator())
  File "/home/bmbouter/Documents/pulp/server/pulp/plugins/conduits/mixins.py", line 709, in _transfer_object_generator
    type_def = type_defs[type_id]
KeyError: u'puppet_module'

It would be good if this was fixed in a way that generalized to more gracefully handle type_def lookup failures all over the codebase.


Related issues

Related to Pulp - Task #1212: Fix Unit removal. It does not work with mongoengine modelsCLOSED - CURRENTRELEASEmhrivnak

Actions
Related to Puppet Support - Issue #1215: Unit removal --type doesn't work with mongoengine converted typesCLOSED - CURRENTRELEASEmhrivnakActions
Actions #1

Updated by bmbouter about 9 years ago

  • Related to Task #1212: Fix Unit removal. It does not work with mongoengine models added
Actions #2

Updated by bmbouter about 9 years ago

  • Related to Issue #1215: Unit removal --type doesn't work with mongoengine converted types added
Actions #3

Updated by bmbouter about 9 years ago

  • Related to deleted (Task #1212: Fix Unit removal. It does not work with mongoengine models)
Actions #4

Updated by bmbouter about 9 years ago

  • Related to deleted (Issue #1215: Unit removal --type doesn't work with mongoengine converted types)
Actions #5

Updated by bmbouter about 9 years ago

  • Parent issue set to #765
Actions #6

Updated by bmbouter about 9 years ago

  • Related to Task #1212: Fix Unit removal. It does not work with mongoengine models added
Actions #7

Updated by bmbouter about 9 years ago

  • Related to Issue #1215: Unit removal --type doesn't work with mongoengine converted types added
Actions #8

Updated by mhrivnak about 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to mhrivnak
  • Triaged changed from No to Yes
Actions #9

Updated by mhrivnak about 9 years ago

  • Status changed from ASSIGNED to POST

Added by mhrivnak about 9 years ago

Revision 4f591414 | View on GitHub

a repo unit association query now works for types defined with mongoengine

https://pulp.plan.io/issues/1239

This bug affected the "get_units" method of at least two conduit mixins.

fixes #1239

Added by mhrivnak about 9 years ago

Revision 4f591414 | View on GitHub

a repo unit association query now works for types defined with mongoengine

https://pulp.plan.io/issues/1239

This bug affected the "get_units" method of at least two conduit mixins.

fixes #1239

Actions #10

Updated by mhrivnak about 9 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #11

Updated by dkliban@redhat.com over 8 years ago

  • Status changed from MODIFIED to 5
Actions #12

Updated by dkliban@redhat.com over 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #13

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF