Issue #1239
closedRefactor #765: Convert Pulp to use MongoEngine
Pulp FileDistributor base class raises exception when operating on mongoengine based unit
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
Updated by bmbouter over 9 years ago
- Related to Task #1212: Fix Unit removal. It does not work with mongoengine models added
Updated by bmbouter over 9 years ago
- Related to Issue #1215: Unit removal --type doesn't work with mongoengine converted types added
Updated by bmbouter over 9 years ago
- Related to deleted (Task #1212: Fix Unit removal. It does not work with mongoengine models)
Updated by bmbouter over 9 years ago
- Related to deleted (Issue #1215: Unit removal --type doesn't work with mongoengine converted types)
Updated by bmbouter over 9 years ago
- Related to Task #1212: Fix Unit removal. It does not work with mongoengine models added
Updated by bmbouter over 9 years ago
- Related to Issue #1215: Unit removal --type doesn't work with mongoengine converted types added
Updated by mhrivnak over 9 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to mhrivnak
- Triaged changed from No to Yes
Updated by mhrivnak over 9 years ago
- Status changed from ASSIGNED to POST
Added by mhrivnak over 9 years ago
Added by mhrivnak over 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
Updated by mhrivnak over 9 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|4f591414a866ef5f91ae1b3fa4a13372af245ebd.
Updated by dkliban@redhat.com almost 9 years ago
- Status changed from MODIFIED to 5
Updated by dkliban@redhat.com over 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
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