Project

Profile

Help

Issue #930

closed

pulp-admin not copying package groups and categories

Added by jkvita over 9 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.6 Beta
Platform Release:
2.6.3
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

When copying package group according to this: https://pulp-rpm.readthedocs.org/en/latest/user-guide/recipes.html#copying-package-groups-between-repos
Second repository contain only the group, but not the rpms in the group.

Same issue with package category: https://pulp-rpm.readthedocs.org/en/latest/user-guide/recipes.html#copying-package-categories
Second repository contain only the category, but not the groups and rpms.

Commands reported:

pulp-admin rpm repo copy group --match id=pulp_test --from-repo-id=repo_1 --to-repo-id=repo_2
--------------------------
pulp-admin rpm repo copy category --match id=example_category --from-repo-id=repo_1 --to-repo-id=repo_2

Actions #1

Updated by rbarlow over 9 years ago

On 04/30/2015 05:01 AM, jkvita wrote:

pulp-admin rpm repo copy group --match id=pulp_test
--from-repo-id=repo_1 --to-repo-id=repo_2
--------------------------
pulp-admin rpm repo copy category --match id=example_category
--from-repo-id=repo_1 --to-repo-id=repo_2

Both of these commands have a --recursive flag that should copy the RPMs
referenced by these types. Perhaps that will help you!
--
Randy Barlow

Actions #2

Updated by jkvita over 9 years ago

rbarlow wrote:

Both of these commands have a --recursive flag that should copy the RPMs
referenced by these types. Perhaps that will help you!
--
Randy Barlow

Thank you,
This flag is causing an error, item is copied as without --recursive and then task fails.

ciation:ERROR: (21963-62304) TypeError: 'NoneType' object is not iterable
ciation:ERROR: (21963-62304) names.extend(self.metadata.get(list_name, []))
ciation:ERROR: (21963-62304) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 257, in all_package_names
ciation:ERROR: (21963-62304) rpm_names.update(model.all_package_names)
ciation:ERROR: (21963-62304) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 285, in identify_children_to_copy
ciation:ERROR: (21963-62304) group_ids, rpm_names, rpm_search_dicts = identify_children_to_copy(associated_units)
ciation:ERROR: (21963-62304) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 58, in associate
ciation:ERROR: (21963-62304) associated_units |= set(associate(source_repo, dest_repo, import_conduit, config, group_units))
ciation:ERROR: (21963-62304) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 65, in associate
ciation:ERROR: (21963-62304) return associate.associate(source_repo, dest_repo, import_conduit, config, units)
ciation:ERROR: (21963-62304) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 47, in import_units
ciation:ERROR: (21963-62304) units=transfer_units)
ciation:ERROR: (21963-62304) File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/unit_association.py", line 273, in associate_from_repo
ciation:ERROR: (21963-62304) Traceback (most recent call last):
ciation:ERROR: (21963-62304) Exception from importer [yum_importer] while importing units into repository [repo_2]

Also, if it should work with the --recursive flag, it would be nice to put it in the documentation.

Jakub Kvita

Actions #3

Updated by mhrivnak over 9 years ago

There should be an additional traceback immediately above the line that includes "TypeError". Could you attach that part of the log as well?

Also, please provide the output of

rpm -qa| grep pulp
Actions #4

Updated by jkvita over 9 years ago

Sorry for confusion, that traceback has inverted lines, you're probably looking for that. Anyway I attached it again in proper order and with second error from celery:

ciation:ERROR: (21963-62304) Exception from importer [yum_importer] while importing units into repository [repo_2]
ciation:ERROR: (21963-62304) Traceback (most recent call last):
ciation:ERROR: (21963-62304)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/unit_association.py", line 273, in associate_from_repo
ciation:ERROR: (21963-62304)     units=transfer_units)
ciation:ERROR: (21963-62304)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 47, in import_units
ciation:ERROR: (21963-62304)     return associate.associate(source_repo, dest_repo, import_conduit, config, units)
ciation:ERROR: (21963-62304)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 65, in associate
ciation:ERROR: (21963-62304)     associated_units |= set(associate(source_repo, dest_repo, import_conduit, config, group_units))
ciation:ERROR: (21963-62304)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 58, in associate
ciation:ERROR: (21963-62304)     group_ids, rpm_names, rpm_search_dicts = identify_children_to_copy(associated_units)
ciation:ERROR: (21963-62304)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 285, in identify_children_to_copy
ciation:ERROR: (21963-62304)     rpm_names.update(model.all_package_names)
ciation:ERROR: (21963-62304)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 257, in all_package_names
ciation:ERROR: (21963-62304)     names.extend(self.metadata.get(list_name, []))
ciation:ERROR: (21963-62304) TypeError: 'NoneType' object is not iterable
04) Task pulp.server.managers.repo.unit_association.associate_from_repo[46bc87a6-cb10-4d66-a74f-d42446fac91a] raised unexpected: PulpExecutionException()
04) Traceback (most recent call last):
04)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
04)     R = retval = fun(*args, **kwargs)
04)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 328, in __call__
04)     return super(Task, self).__call__(*args, **kwargs)
04)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
04)     return self.run(*args, **kwargs)
04)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/repo/unit_association.py", line 273, in associate_from_repo
04)     units=transfer_units)
04)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 47, in import_units
04)     return associate.associate(source_repo, dest_repo, import_conduit, config, units)
04)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 65, in associate
04)     associated_units |= set(associate(source_repo, dest_repo, import_conduit, config, group_units))
04)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 58, in associate
04)     group_ids, rpm_names, rpm_search_dicts = identify_children_to_copy(associated_units)
04)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/associate.py", line 285, in identify_children_to_copy
04)     rpm_names.update(model.all_package_names)
04)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 257, in all_package_names
04)     names.extend(self.metadata.get(list_name, []))
04) PulpExecutionException: Pulp exception occurred: PulpExecutionException
# rpm -qa| grep pulp
python-pulp-bindings-2.6.1-0.3.rc.fc20.noarch
python-pulp-agent-lib-2.6.1-0.3.rc.fc20.noarch
pulp-puppet-handlers-2.6.1-0.3.rc.fc20.noarch
pulp-rpm-handlers-2.6.1-0.4.rc.fc20.noarch
pulp-docker-admin-extensions-1.0.0-1.fc20.noarch
python-kombu-3.0.24-5.pulp.fc20.noarch
python-pulp-rpm-common-2.6.1-0.4.rc.fc20.noarch
pulp-server-2.6.1-0.3.rc.fc20.noarch
pulp-selinux-2.6.1-0.3.rc.fc20.noarch
python-pulp-client-lib-2.6.1-0.3.rc.fc20.noarch
pulp-puppet-admin-extensions-2.6.1-0.3.rc.fc20.noarch
pulp-rpm-consumer-extensions-2.6.1-0.4.rc.fc20.noarch
pulp-docker-plugins-1.0.0-1.fc20.noarch
python-pulp-puppet-common-2.6.1-0.3.rc.fc20.noarch
pulp-rpm-plugins-2.6.1-0.4.rc.fc20.noarch
pulp-rpm-admin-extensions-2.6.1-0.4.rc.fc20.noarch
python-isodate-0.5.0-4.pulp.fc20.noarch
pulp-puppet-consumer-extensions-2.6.1-0.3.rc.fc20.noarch
python-pulp-docker-common-1.0.0-1.fc20.noarch
pulp-puppet-plugins-2.6.1-0.3.rc.fc20.noarch
pulp-admin-client-2.6.1-0.3.rc.fc20.noarch
pulp-consumer-client-2.6.1-0.3.rc.fc20.noarch
python-pulp-common-2.6.1-0.3.rc.fc20.noarch
pulp-agent-2.6.1-0.3.rc.fc20.noarch
pulp-rpm-yumplugins-2.6.1-0.4.rc.fc20.noarch
Actions #5

Updated by jortel@redhat.com over 9 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
Actions #6

Updated by ipanova@redhat.com over 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
Actions #7

Updated by ipanova@redhat.com over 9 years ago

  • Status changed from ASSIGNED to POST
  • Platform Release set to 2.6.2
Actions #9

Updated by ipanova@redhat.com over 9 years ago

  • Platform Release changed from 2.6.2 to 2.6.3

Added by ipanova@redhat.com over 9 years ago

Revision 72263dd7 | View on GitHub

pulp-admin not copying package groups and categories

closes #930 https://pulp.plan.io/issues/930

Actions #10

Updated by ipanova@redhat.com over 9 years ago

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

Updated by dkliban@redhat.com over 9 years ago

  • Status changed from MODIFIED to 5
Actions #13

Updated by pthomas@redhat.com over 9 years ago

  • Status changed from 5 to 6

verified

[root@mgmt4 ~]# pulp-admin rpm repo copy group --match id=mammals --from-repo-id=zoo --to-repo-id=test --recursive 
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Copied:
 package_group:
  mammals
 rpm:
  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
  cow-2.2-3-noarch
  crow-0.8-1-noarch
  dog-4.23-1-noarch
  dolphin-3.10.232-1-noarch
  elephant-8.3-1-noarch
  fox-1.1-2-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-5.21-1-noarch
  whale-0.2-1-noarch
  wolf-9.4-2-noarch
  zebra-0.1-2-noarch

[root@mgmt4 ~]# pulp-admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  synergism
Display Name:        synergism
Description:         None
Content Unit Counts: 

Id:                  test1
Display Name:        test1
Description:         None
Content Unit Counts: 

Id:                  zoo
Display Name:        zoo
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32

Id:                  test
Display Name:        test
Description:         None
Content Unit Counts: 
  Package Group: 1
  Rpm:           28

[root@mgmt4 ~]# 
[root@mgmt4 ~]# 
[root@mgmt4 ~]# pulp-admin rpm repo content category --repo-id zooDescription:     None
Id:              all
Name:            all
Packagegroupids: mammals, birds

[root@mgmt4 ~]# pulp-admin rpm repo copy category --match id=mammals --from-repo-id=zoo --to-repo-id=test --recursive 
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Nothing found that matches the given criteria.

[root@mgmt4 ~]# pulp-admin rpm repo copy category --match id=all --from-repo-id=zoo --to-repo-id=test --recursive 
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Copied:
 package_category:
  all
 package_group:
  birds
  mammals
 rpm:
  cockateel-3.1-1-noarch
  duck-0.6-1-noarch

[root@mgmt4 ~]# 
Actions #14

Updated by dkliban@redhat.com about 9 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #16

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF