Bug 984104 - repo copy group with --recursive flag fails
repo copy group with --recursive flag fails
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.2 Beta
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.2.0
Assigned To: Michael Hrivnak
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-12 15:37 EDT by Preethi Thomas
Modified: 2013-09-10 11:43 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-10 11:43:37 EDT
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 2013-07-12 15:37:30 EDT
Description of problem:

Running repo copy group --recursive seems to be failing

Version-Release number of selected component (if applicable):
[root@ibm-x3550m3-11 ~]# rpm -qa |grep pulp-server
pulp-server-2.2.0-0.20.beta.fc18.noarch
[root@ibm-x3550m3-11 ~]# 


How reproducible:


Steps to Reproduce:
^C
[root@ibm-x3550m3-11 ~]# pulp-admin rpm repo copy group -f zoo -t zoo-copy  --recursive 
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...

[-]
Running...

Task Failed

[u'PulpExecutionException: Pulp exception occurred: PulpExecutionException\n']


Actual results:


Expected results:


Additional info:
2013-07-12 15:28:06,439 pulp.plugins.conduits.mixins:ERROR: Exception from server requesting all content units for repository [zoo-copy]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/mixins.py", line 617, in do_get_repo_units
    u = common_utils.to_plugin_associated_unit(unit, type_defs[type_id])
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/_common.py", line 92, in to_plugin_associated_unit
    unit_key[k] = pulp_unit['metadata'].pop(k)
KeyError: u'epoch'
2013-07-12 15:28:06,440 pulp.server.managers.repo.unit_association:ERROR: Exception from importer [yum_importer] while importing units into repository [zoo-copy]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/unit_association.py", line 276, in associate_from_repo
    call_config, units=transfer_units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 68, in import_units
    return associate.associate(source_repo, dest_repo, import_conduit, config, units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 86, in associate
    names_to_copy = get_rpms_to_copy_by_name(rpm_names, import_conduit)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 143, in get_rpms_to_copy_by_name
    for unit in units:
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/existing.py", line 65, in get_existing_units
    for result in search_method(criteria):
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/unit_import.py", line 145, in get_destination_units
    return mixins.do_get_repo_units(self.dest_repo_id, criteria, ImporterConduitException)
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/mixins.py", line 617, in do_get_repo_units
    u = common_utils.to_plugin_associated_unit(unit, type_defs[type_id])
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/_common.py", line 92, in to_plugin_associated_unit
    unit_key[k] = pulp_unit['metadata'].pop(k)
ImporterConduitException: u'epoch'
2013-07-12 15:28:06,441 pulp.server.dispatch.task:ERROR: Pulp exception occurred: PulpExecutionException
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/dispatch/task.py", line 138, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/unit_association.py", line 276, in associate_from_repo
    call_config, units=transfer_units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 68, in import_units
    return associate.associate(source_repo, dest_repo, import_conduit, config, units)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 86, in associate
    names_to_copy = get_rpms_to_copy_by_name(rpm_names, import_conduit)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 143, in get_rpms_to_copy_by_name
    for unit in units:
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/existing.py", line 65, in get_existing_units
    for result in search_method(criteria):
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/unit_import.py", line 145, in get_destination_units
    return mixins.do_get_repo_units(self.dest_repo_id, criteria, ImporterConduitException)
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/mixins.py", line 617, in do_get_repo_units
    u = common_utils.to_plugin_associated_unit(unit, type_defs[type_id])
  File "/usr/lib/python2.7/site-packages/pulp/plugins/conduits/_common.py", line 92, in to_plugin_associated_unit
    unit_key[k] = pulp_unit['metadata'].pop(k)
PulpExecutionException: Pulp exception occurred: PulpExecutionException
2013-07-12 15:28:06,442 pulp.server.dispatch.task:INFO: FAILURE: Task a5159dc3-9b6e-4d53-b5f0-dd865a9c3233: CallRequest: RepoUnitAssociationManager.associate_from_repo('zoo', u'zoo-copy', import_config_override=****, criteria=****)
Comment 1 Michael Hrivnak 2013-07-15 13:51:12 EDT
This seems to only happen if the destination repository already has RPMs in it that are now being considered for copy.

So to reproduce:

1) create and sync a repo
2) create a new empty repo
3) copy groups with --recursive
4) run exact same command from step 3 a second time
Comment 2 Michael Hrivnak 2013-07-15 14:47:05 EDT
https://github.com/pulp/pulp_rpm/pull/277
Comment 3 Jeff Ortel 2013-07-15 20:27:02 EDT
build: 2.2.0-0.21.beta
Comment 4 Preethi Thomas 2013-07-24 09:36:18 EDT
[root@mgmt12 ~]# rpm -qa pulp-server
pulp-server-2.2.0-0.21.beta.el6.noarch
[root@mgmt12 ~]# 

[root@mgmt12 ~]# pulp-admin rpm repo copy rpm -f zoo -t zoo-cop
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...

[-]
Running...

Units:
  bear-4.1-1-noarch
  camel-0.1-1-noarch
  cat-1.0-1-noarch
  cheetah-1.25.3-5-noarch
  chimpanzee-0.21-1-noarch
  cockateel-3.1-1-noarch
  cow-2.2-3-noarch
  crow-0.8-1-noarch
  dog-4.23-1-noarch
  dolphin-3.10.232-1-noarch
  duck-0.6-1-noarch
  elephant-8.3-1-noarch
  fox-1.1-2-noarch
  frog-0.1-1-noarch
  giraffe-0.67-2-noarch
  gorilla-0.62-1-noarch
  horse-0.22-2-noarch
  kangaroo-0.2-1-noarch
  lion-0.4-1-noarch
  mouse-0.1.12-1-noarch
  penguin-0.9.1-1-noarch
  pike-2.2-1-noarch
  shark-0.1-1-noarch
  squirrel-0.1-1-noarch
  stork-0.12-2-noarch
  tiger-1.0-4-noarch
  trout-0.12-1-noarch
  walrus-0.71-1-noarch
  walrus-5.21-1-noarch
  whale-0.2-1-noarch
  wolf-9.4-2-noarch
  zebra-0.1-2-noarch

[root@mgmt12 ~]# pulp-admin rpm repo copy group  -f zoo -t zoo-cop --recursive 
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...

[-]
Running...

Units:
  birds
  mammals

[root@mgmt12 ~]#
Comment 5 Preethi Thomas 2013-09-10 11:43:37 EDT
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/

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