Issue #1239
Refactor #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
Associated revisions
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
History
#1
Updated by bmbouter over 5 years ago
- Related to Task #1212: Fix Unit removal. It does not work with mongoengine models added
#2
Updated by bmbouter over 5 years ago
- Related to Issue #1215: Unit removal --type doesn't work with mongoengine converted types added
#3
Updated by bmbouter over 5 years ago
- Related to deleted (Task #1212: Fix Unit removal. It does not work with mongoengine models)
#4
Updated by bmbouter over 5 years ago
- Related to deleted (Issue #1215: Unit removal --type doesn't work with mongoengine converted types)
#5
Updated by bmbouter over 5 years ago
- Parent task set to #765
#6
Updated by bmbouter over 5 years ago
- Related to Task #1212: Fix Unit removal. It does not work with mongoengine models added
#7
Updated by bmbouter over 5 years ago
- Related to Issue #1215: Unit removal --type doesn't work with mongoengine converted types added
#8
Updated by mhrivnak over 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to mhrivnak
- Triaged changed from No to Yes
#9
Updated by mhrivnak over 5 years ago
- Status changed from ASSIGNED to POST
#10
Updated by mhrivnak over 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|4f591414a866ef5f91ae1b3fa4a13372af245ebd.
#11
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from MODIFIED to 5
#12
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
#13
Updated by bmbouter almost 2 years ago
- Tags Pulp 2 added
Please register to edit this issue
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