Project

Profile

Help

Task #1212

closed

Refactor #765: Convert Pulp to use MongoEngine

Fix Unit removal. It does not work with mongoengine models

Added by bmbouter over 8 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.8.0
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

If you have a mongoengine converted repo with a unit in it you cannot remove that unit by name. For example if testing against the in-development puppet conversion to mongoengine then you can run the following commands to cause this failure:

pulp-admin login -u admin -p admin
pulp-admin puppet repo create --repo-id=forge --feed=http://forge.puppetlabs.com --queries torssh
pulp-admin puppet repo sync run --repo-id forge
pulp-admin puppet repo remove --repo-id forge --str-eq="name=torssh"

You'll see the following traceback in the celery worker running the unit removal task code:

  File "/home/bmbouter/Documents/pulp/server/pulp/server/managers/repo/unit_association.py", line 336, in unassociate_by_criteria
    transfer_units = create_transfer_units(unassociate_units, unit_type_ids)
  File "/home/bmbouter/Documents/pulp/server/pulp/server/managers/repo/unit_association.py", line 410, in create_transfer_units
    u = conduit_common_utils.to_plugin_associated_unit(unit, type_defs[type_id])
  File "/home/bmbouter/Documents/pulp/server/pulp/plugins/conduits/_common.py", line 76, in to_plugin_associated_unit
    key_list = type_def['unit_key'] 
TypeError: 'NoneType' object has no attribute '__getitem__'

Related issues

Related to Pulp - Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unitCLOSED - CURRENTRELEASEmhrivnakActions
Actions #1

Updated by bmbouter over 8 years ago

  • Blocks Task #1213: Orphan listing and removal does not work with mongoengine converted models added
Actions #2

Updated by bmbouter over 8 years ago

  • Blocks deleted (Task #1213: Orphan listing and removal does not work with mongoengine converted models)
Actions #3

Updated by mhrivnak over 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to mhrivnak

Added by mhrivnak over 8 years ago

Revision af2d621a | View on GitHub

Fixed the unit unassociate workflow to work with mongoengine models and filters

fixes #1212

Added by mhrivnak over 8 years ago

Revision af2d621a | View on GitHub

Fixed the unit unassociate workflow to work with mongoengine models and filters

fixes #1212

Actions #4

Updated by mhrivnak over 8 years ago

  • Status changed from ASSIGNED to POST
Actions #5

Updated by mhrivnak over 8 years ago

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

Updated by bmbouter over 8 years ago

  • Related to Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unit added
Actions #7

Updated by bmbouter over 8 years ago

  • Related to deleted (Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unit)
Actions #8

Updated by bmbouter over 8 years ago

  • Related to Issue #1239: Pulp FileDistributor base class raises exception when operating on mongoengine based unit added
Actions #9

Updated by rbarlow about 8 years ago

  • Status changed from MODIFIED to 5
  • Platform Release set to 2.8.0
Actions #10

Updated by dkliban@redhat.com almost 8 years ago

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

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF