Bug 837361 - repository sync errors out when repo created with --skip-types errata
repository sync errors out when repo created with --skip-types errata
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 38
Assigned To: Pradeep Kilambi
Preethi Thomas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-03 11:44 EDT by Preethi Thomas
Modified: 2013-09-09 12:33 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 09:10:10 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-07-03 11:44:27 EDT
Description of problem:

repository sync errors out when repo created with --skip-types errata

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

[root@preethi-el6-pulp ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.310-1.el6.noarch

How reproducible:


Steps to Reproduce:
1.create a repo with a feed that has errata and use --skip-types errata
2.sync the repo
3.
  
Actual results:

[root@preethi-el6-pulp ~]# pulp-admin repo create --repo-id pulp-unittest --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/pulp_unittest/ --skip-types errata
Successfully created repository [pulp-unittest]

[root@preethi-el6-pulp ~]# pulp-admin repo sync run --repo-id pulp-unittest+----------------------------------------------------------------------+
                Synchronizing Repository [pulp-unittest]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[-]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       3/3 items
Delta RPMs: 0/0 items
Tree Files: 3/3 items
Files:      0/0 items
... completed

Publishing packages...
[==================================================] 100%
Packages: 0/0 items
... completed

Publishing distributions...
[==================================================] 100%
Distributions: 3/3 items
... completed

Generating metadata
[|]
Error during repository synchronization

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




Expected results:


Additional info:

From pulp.log
2012-07-03 11:39:07,307 13167:140465934419712: pulp.server.managers.repo.publish:ERROR: publish:111 Exception caught from plugin during publish for repo [pulp-unittest]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 97, in publish
    publish_report = distributor_instance.publish_repo(transfer_repo, conduit, call_config)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/distributor.py", line 446, in publish_repo
    repo, publish_conduit, config, progress_callback, groups_xml_path)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/metadata.py", line 92, in generate_metadata
    create_repo(repo_dir, groups=groups_xml_path, checksum_type=checksum_type, skip_metadata_types=skip_metadata_types)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/metadata.py", line 259, in create_repo
    if ftype in skip_metadata_types and not skip_metadata_types[ftype]:
TypeError: list indices must be integers, not str
2012-07-03 11:39:07,308 13167:140465934419712: pulp.server.managers.repo.publish:ERROR: publish:179 Exception on auto distribute call for repo [pulp-unittest] distributor [yum_distributor]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 177, in auto_publish_for_repo
    self.publish(repo_id, dist_id, None, base_progress_report=base_progress_report)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 97, in publish
    publish_report = distributor_instance.publish_repo(transfer_repo, conduit, call_config)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/distributor.py", line 446, in publish_repo
    repo, publish_conduit, config, progress_callback, groups_xml_path)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/metadata.py", line 92, in generate_metadata
    create_repo(repo_dir, groups=groups_xml_path, checksum_type=checksum_type, skip_metadata_types=skip_metadata_types)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/metadata.py", line 259, in create_repo
    if ftype in skip_metadata_types and not skip_metadata_types[ftype]:
PulpExecutionException: Pulp exception occurred: PulpExecutionException
2012-07-03 11:39:07,310 13167:140465934419712: pulp.server.managers.repo.sync:ERROR: sync:172 Exception automatically publishing distributors for repo [pulp-unittest]
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 170, in sync
    publish_manager.auto_publish_for_repo(repo_id, sync_progress_report)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 184, in auto_publish_for_repo
    raise PulpExecutionException()
PulpExecutionException: Pulp exception occurred: PulpExecutionException
2012-07-03 11:39:07,310 13167:140465934419712: pulp.server.dispatch.task:ERROR: task:133 Pulp exception occurred: PulpExecutionException
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py", line 130, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 170, in sync
    publish_manager.auto_publish_for_repo(repo_id, sync_progress_report)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 184, in auto_publish_for_repo
    raise PulpExecutionException()
PulpExecutionException: Pulp exception occurred: PulpExecutionException
2012-07-03 11:39:07,311 13167:140465934419712: pulp.server.dispatch.task:INFO: task:163 Task 366f964f-c525-11e1-a434-525400c5886c: CallRequest: RepoSyncManager.sync(u'pulp-unittest', sync_config_override=None) FAILED
Comment 1 Pradeep Kilambi 2012-07-16 13:56:16 EDT
commit 452888c8a3e31ce3f98259c02dfdf77a1355ace8

The issue is help references the wrong type for skip types. Its erratum instead of errata. fixed
Comment 2 Jeff Ortel 2012-07-18 11:28:39 EDT
build: 0.314.
Comment 3 Preethi Thomas 2012-07-25 10:52:38 EDT
verified
[root@preethi-el6-pulp ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.318-1.el6.noarch

[root@preethi-el6-pulp ~]# pulp-admin repo create --repo-id pulp-unittest --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/pulp_unittest/ --skip-types erratum
Successfully created repository [pulp-unittest]

[root@preethi-el6-pulp ~]# pulp-admin repo sync run --repo-id pulp-unittest
+----------------------------------------------------------------------+
                Synchronizing Repository [pulp-unittest]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[/]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       3/3 items
Delta RPMs: 0/0 items
Tree Files: 3/3 items
Files:      0/0 items
... completed

Importing package groups/categories...
[-]
... completed

Publishing packages...
[==================================================] 100%
Packages: 0/0 items
... completed

Publishing distributions...
[==================================================] 100%
Distributions: 3/3 items
... completed

Generating metadata
[|]
... completed

Publishing repository over HTTP
[-]
... skipped

Publishing repository over HTTPS
[-]
... completed

Successfully synchronized repository


[root@preethi-el6-pulp ~]# pulp-admin repo create --repo-id pulp-unittest --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/pulp_unittest/ --skip-types erratum --skip-types distribution 
Successfully created repository [pulp-unittest]

[root@preethi-el6-pulp ~]# pulp-admin repo sync run --repo-id pulp-unittest
+----------------------------------------------------------------------+
                Synchronizing Repository [pulp-unittest]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[/]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       3/3 items
Delta RPMs: 0/0 items
Tree Files: 0/0 items
Files:      0/0 items
... completed

Importing errata...
[\]
... completed

Importing package groups/categories...
[-]
... completed

Publishing packages...
[==================================================] 100%
Packages: 0/0 items
... completed

Generating metadata
[|]
... completed

Publishing repository over HTTP
[-]
... skipped

Publishing repository over HTTPS
[-]
... completed

Successfully synchronized repository

[root@preethi-el6-pulp ~]#
Comment 4 Preethi Thomas 2013-01-07 09:10:10 EST
Pulp 2.0 released.

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