Issue #1215
Pulp - Refactor #765: Convert Pulp to use MongoEngine
Unit removal --type doesn't work with mongoengine converted types
Description
I was trying to do some orphan removal with --type for a converted mongoengine model (puppet in my case) and it didn't work for me
1. Assuming I have a puppet_module already orphaned
2. Try to remove it using orphan remove --type puppet_module as follow
[bmbouter@dhcp129-138 pulp]$ pulp-admin orphan remove --type puppet_module
You'll get the following error on the CLI:
The following resource(s) could not be found:
puppet_module (content_type_id)
Related issues
Associated revisions
Revision 112ceead
View on GitHub
fixed orphan removal by type when the type uses mongoengine
Several places in the code, only two of which I touched here, need to know the unit key fields for a given type ID. I created a new controller function that takes care of finding that information regardless of whether the type is defined the new way (mongonengine) or old way. The next step will be to use that controller function in additional places, but that is beyond the scope of this bug fix.
fixes #1215
History
#1
Updated by bmbouter over 5 years ago
- Subject changed from Help text for orphan removal using --type example doesn't work to Unit removal --type doesn't work with mongoengine
#2
Updated by bmbouter over 5 years ago
- Tags deleted (
Easy Fix)
#3
Updated by bmbouter over 5 years ago
- Subject changed from Unit removal --type doesn't work with mongoengine to Unit removal --type doesn't work with mongoengine converted types
#4
Updated by mhrivnak over 5 years ago
- Platform Release set to 2.8.0
#5
Updated by mhrivnak over 5 years ago
- Triaged changed from No to Yes
#6
Updated by mhrivnak over 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to mhrivnak
#7
Updated by bmbouter over 5 years ago
- Related to Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unit added
#8
Updated by bmbouter over 5 years ago
- Related to deleted (Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unit)
#9
Updated by bmbouter over 5 years ago
- Related to Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unit added
#10
Updated by mhrivnak over 5 years ago
- Status changed from ASSIGNED to POST
#11
Updated by mhrivnak over 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp:pulp|112ceead7cab883789b97ec529a351b16723e8d4.
#12
Updated by rbarlow almost 5 years ago
- Status changed from MODIFIED to 5
#13
Updated by dkliban@redhat.com almost 5 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
#14
Updated by bmbouter almost 2 years ago
- Tags Pulp 2 added
Please register to edit this issue
fixed orphan removal by type when the type uses mongoengine
Several places in the code, only two of which I touched here, need to know the unit key fields for a given type ID. I created a new controller function that takes care of finding that information regardless of whether the type is defined the new way (mongonengine) or old way. The next step will be to use that controller function in additional places, but that is beyond the scope of this bug fix.
fixes #1215