Project

Profile

Help

Task #1212

Refactor #765: Convert Pulp to use MongoEngine

Fix Unit removal. It does not work with mongoengine models

Added by bmbouter over 6 years ago. Updated over 2 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 - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision af2d621a View on GitHub
Added by mhrivnak over 6 years ago

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

fixes #1212

Revision af2d621a View on GitHub
Added by mhrivnak over 6 years ago

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

fixes #1212

History

#1 Updated by bmbouter over 6 years ago

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

#2 Updated by bmbouter over 6 years ago

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

#3 Updated by mhrivnak over 6 years ago

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

#4 Updated by mhrivnak over 6 years ago

  • Status changed from ASSIGNED to POST

#5 Updated by mhrivnak about 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by bmbouter about 6 years ago

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

#7 Updated by bmbouter about 6 years ago

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

#8 Updated by bmbouter about 6 years ago

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

#9 Updated by rbarlow almost 6 years ago

  • Status changed from MODIFIED to 5
  • Platform Release set to 2.8.0

#10 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#11 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF