Bug 853503 - packagegroup category removal fails.
packagegroup category removal fails.
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: rpm-support (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 40
Assigned To: Pradeep Kilambi
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-31 14:36 EDT by Preethi Thomas
Modified: 2013-01-09 12:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:07:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-08-31 14:36:33 EDT
Description of problem:

removing package category seems to be failing.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:


root@preethi-el6-pulp ~]# pulp-admin repo units package-category --repo-id zoo 
Created:       2012-08-31T10:44:25
Id:            5040cdc9196f452425000060
Metadata:      
  Description:            None
  Display Order:          99
  Id:                     all
  Name:                   all
  Packagegroupids:        mammals, birds
  Repo Id:                zoo
  Translated Description: 
  Translated Name:        
Owner Id:      yum_importer
Owner Type:    importer
Repo Id:       zoo
Unit Id:       c1ad15f6-9733-44ff-b669-bc0f100e3de6
Unit Type Id:  package_category
Updated:       2012-08-31T10:44:25


Created:       2012-08-31T14:29:27
Id:            50410287196f452592000024
Metadata:      
  Description:            mammals
  Display Order:          0
  Id:                     mammals
  Name:                   mammals
  Packagegroupids:        None
  Repo Id:                zoo
  Translated Description: 
  Translated Name:        
Owner Id:      SYSTEM
Owner Type:    user
Repo Id:       zoo
Unit Id:       e952d672-ca9d-4203-bc04-f2f5725ce08a
Unit Type Id:  package_category
Updated:       2012-08-31T14:29:27


[root@preethi-el6-pulp ~]# pulp-admin repo remove package-category --repo-id zoo --match name=mammals
Progress on this task can be viewed using the commands under "repo tasks".



  
Actual results:


Expected results:


Additional info:

2012-08-31 14:33:33,446 9618:140587772647168: pulp.server.dispatch.call:ERROR: call:191 Exception encountered while pickling: args
2012-08-31 14:33:33,447 9618:140587772647168: pulp.server.dispatch.call:ERROR: call:192 'NoneType' object is not callable
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/call.py", line 187, in serialize
    data[field] = pickle.dumps(getattr(self, field))
  File "/usr/lib64/python2.6/pickle.py", line 1366, in dumps
    Pickler(file, protocol).dump(obj)
  File "/usr/lib64/python2.6/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib64/python2.6/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib64/python2.6/pickle.py", line 600, in save_list
    self._batch_appends(iter(obj))
  File "/usr/lib64/python2.6/pickle.py", line 615, in _batch_appends
    save(x)
  File "/usr/lib64/python2.6/pickle.py", line 306, in save
    rv = reduce(self.proto)
  File "/usr/lib64/python2.6/copy_reg.py", line 84, in _reduce_ex
    dict = getstate()
TypeError: 'NoneType' object is not callable
2012-08-31 14:33:33,514 9618:140587751667456: pulp.plugins.yum_importer.importer:INFO: importer:334 remove_units invoked for 1 units
2012-08-31 14:33:33,515 9618:140587751667456: pulp.server.managers.repo.unit_association:ERROR: unit_association:477 Exception from importer [yum_importer] while removing units from repo [zoo]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/unit_association.py", line 475, in remove_from_importer
    importer_instance.remove_units(transfer_repo, transfer_units, call_config)
  File "/usr/lib/pulp/plugins/importers/yum_importer/importer.py", line 337, in remove_units
    sym_link = os.path.join(repo.working_dir, repo.id, u.metadata["filename"])
KeyError: 'filename'
2012-08-31 14:33:33,517 9618:140587751667456: pulp.server.dispatch.task:INFO: task:148 Task 5e89f842-f39a-11e1-a203-525400c5886c: CallRequest: RepoUnitAssociationManager.unassociate_by_criteria(u'zoo', {'unit_sort': None, 'association_filters': {}, '_id': ObjectId('5041037d196f45259200002a'), 'remove_duplicates': False, 'skip': None, 'association_fields': None, 'unit_filters': {'_id': {'$in': [u'c1ad15f6-9733-44ff-b669-bc0f100e3de6', u'e952d672-ca9d-4203-bc04-f2f5725ce08a']}, u'name': {u'$regex': u'mammals'}}, 'association_sort': None, 'unit_fields': None, 'limit': None, 'type_ids': [u'package_category'], 'id': '5041037d196f45259200002a'}, 'user', u'admin') SUCCEEDED
2012-08-31 14:33:33,524 9618:140587751667456: pulp.server.dispatch.call:ERROR: call:191 Exception encountered while pickling: args
2012-08-31 14:33:33,525 9618:140587751667456: pulp.server.dispatch.call:ERROR: call:192 'NoneType' object is not callable
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/call.py", line 187, in serialize
    data[field] = pickle.dumps(getattr(self, field))
  File "/usr/lib64/python2.6/pickle.py", line 1366, in dumps
    Pickler(file, protocol).dump(obj)
  File "/usr/lib64/python2.6/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib64/python2.6/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib64/python2.6/pickle.py", line 600, in save_list
    self._batch_appends(iter(obj))
  File "/usr/lib64/python2.6/pickle.py", line 615, in _batch_appends
    save(x)
  File "/usr/lib64/python2.6/pickle.py", line 306, in save
    rv = reduce(self.proto)
  File "/usr/lib64/python2.6/copy_reg.py", line 84, in _reduce_ex
    dict = getstate()
TypeError: 'NoneType' object is not callable
Comment 1 Pradeep Kilambi 2012-10-05 12:31:57 EDT
fixed! commit a112c24fa0981415044e9a654a2c53a47c1b3e4a


$ pulp-admin rpm repo content category --repo-id=testrepo
Description:            testc
Display Order:          0
Id:                     testc
Name:                   testc
Packagegroupids:        None
Repo Id:                testrepo
Translated Description: 
Translated Name:        


$ pulp-admin rpm repo remove category --repo-id=testrepo --match='name=testc'
Progress on this task can be viewed using the commands under "repo tasks".

$ pulp-admin rpm repo content category --repo-id=testrepo
$
Comment 2 Jeff Ortel 2012-10-05 17:43:11 EDT
build: 0.331
Comment 3 Preethi Thomas 2012-10-11 09:44:48 EDT
[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.331-1.fc17.noarch
[root@pulp-master ~]# 


[root@pulp-master ~]# pulp-admin rpm repo content category --repo-id zoo
Description:            None
Display Order:          99
Id:                     all
Name:                   all
Packagegroupids:        mammals, birds
Repo Id:                zoo
Translated Description: 
Translated Name:        

Description:            mammals
Display Order:          0
Id:                     mammals
Name:                   mammals
Packagegroupids:        None
Repo Id:                zoo
Translated Description: 
Translated Name:        


[root@pulp-master ~]# pulp-admin rpm repo remove category --repo-id zoo --match name=mammals
Progress on this task can be viewed using the commands under "repo tasks".

[root@pulp-master ~]# pulp-admin rpm repo content category --repo-id zooDescription:            None
Display Order:          99
Id:                     all
Name:                   all
Packagegroupids:        mammals, birds
Repo Id:                zoo
Translated Description: 
Translated Name:        


[root@pulp-master ~]#
Comment 4 Preethi Thomas 2013-01-09 12:07:56 EST
Pulp v2.0 released

Note You need to log in before you can comment on or make changes to this bug.