Bug 840490 - Exception from 'link_errata_rpm_units': KeyError: 'sum'
Exception from 'link_errata_rpm_units': KeyError: 'sum'
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: John Matthews
Preethi Thomas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-16 09:41 EDT by Preethi Thomas
Modified: 2013-09-09 12:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 09:09:42 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)
pulp log when the sync fails (2.70 KB, text/plain)
2012-07-16 09:41 EDT, Preethi Thomas
no flags Details
A second error on repo sync (1.79 KB, text/plain)
2012-07-16 09:42 EDT, Preethi Thomas
no flags Details

  None (edit)
Description Preethi Thomas 2012-07-16 09:41:20 EDT
Created attachment 598451 [details]
pulp log when the sync fails

Description of problem:

Looks like repo sync fails the first time you sync a large repo. Also running a resync on the repo fails as well the first time.
Version-Release number of selected component (if applicable):
[root@preethi-el6-pulp ~]# rpm -qa pulp-rpm-server
pulp-rpm-server-0.0.313-1.el6.noarch
[root@preethi-el6-pulp ~]# 


How reproducible:


Steps to Reproduce:
1. create a repo with the feed  Feed: http://www.gtlib.gatech.edu/pub/fedora-epel/6/x86_64/
2.Run sync on the repo
3.Once it fails run sync again
4. Also wait a day and run repo sync on the above repo
  
Actual results:
root@preethi-el6-pulp ~]# pulp-admin repo sync run --repo epel-6-x86_64
+----------------------------------------------------------------------+
                Synchronizing Repository [epel-6-x86_64]
+----------------------------------------------------------------------+

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

Downloading metadata...
[-]
... failed

Error during repository synchronization

[u'PulpExecutionException: Importer indicated a failed response\n']

[root@preethi-el6-pulp ~]# pulp-admin repo sync run --repo epel-6-x86_64
+----------------------------------------------------------------------+
                Synchronizing Repository [epel-6-x86_64]
+----------------------------------------------------------------------+

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:       77/77 items
Delta RPMs: 0/0 items
Tree Files: 0/0 items
Files:      0/0 items
... completed

Importing errata...
[-]
Error during repository synchronization

[u'PulpExecutionException: Importer indicated a failed response\n']



Expected results:


Additional info:
Comment 1 Preethi Thomas 2012-07-16 09:42:37 EDT
Created attachment 598453 [details]
A second error on repo sync
Comment 2 John Matthews 2012-07-16 10:21:00 EDT
 I think the second attachment shows the error we should focus on:

  File "/usr/lib/pulp/plugins/importers/yum_importer/errata.py", line 180, in link_errata_rpm_units
    pinfo['checksumtype'], pinfo['checksum'] = pinfo['sum']
KeyError: 'sum'
Comment 3 John Matthews 2012-07-16 16:17:12 EDT
The issue is that this repo contains errata info, yet the referenced packages lack checksum info, they only contain NEVRA.  

Below is an example of the updateinfo.xml for a referenced package:

<package arch="i686" epoch="0" name="squidGuard" release="9.el6" src="http://download.fedoraproject.org/pub/fedora/linux/updates/6/i386/squidGuard-1.4-9.el6.i686.rpm" version="1.4"><filename>squidGuard-1.4-9.el6.i686.rpm</filename></package>

The lack of checksum info impacts our ability to determine what rpms to link to the errata.
Comment 4 John Matthews 2012-07-16 17:50:03 EDT
The solution we have chosen is to skip the linking of rpms to errata when the rpm data is incomplete, i.e. it lacks checksum information.

Fix in master:
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=4a19ded8c39d9ff726b48dc86aad0a0f6c681e08

Fix in pulp_CR-1_patches:
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=98201618d24f034ea894905c80c57cd702cc7bcc
Comment 5 Jeff Ortel 2012-07-18 11:28:38 EDT
build: 0.314.
Comment 6 Preethi Thomas 2012-07-20 13:40:04 EDT
verified
[root@preethi ~]# pulp-admin -u admin -p admin repo create --repo pulp --feed http://repos.fedorapeople.org/repos/pulp/pulp/v2/testing/fedora-17/x86_64/
Successfully created repository [pulp]

[root@preethi ~]# pulp-admin -u admin -p admin repo create --repo epel --feed http://www.gtlib.gatech.edu/pub/fedora-epel/6/x86_64/
Successfully created repository [epel]

[root@preethi ~]# pulp-admin -u admin -p admin repo sync run --repo epel 
+----------------------------------------------------------------------+
                    Synchronizing Repository [epel]
+----------------------------------------------------------------------+

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

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

Downloading repository content...
[==============                                    ] 28%
RPMs:       2846/7555 items
Delta RPMs: 0/0 items
Tree Files: 0/0 items
Files:      0/0 items
Write failed: Broken pipe
[pthomas@pthomas-lt ~]$ 
[pthomas@pthomas-lt ~]$ 
[pthomas@pthomas-lt ~]$ ssh root@preethi.usersys.redhat.com
root@preethi.usersys.redhat.com's password: 
Last login: Fri Jul 20 10:51:43 2012 from vpn-10-223.rdu.redhat.com
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin -u admin -p admin repo sync status --repo epel 
+----------------------------------------------------------------------+
                        Repository Status [epel]
+----------------------------------------------------------------------+

A sync task is queued on the server. Its progress will be tracked below.

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:       7555/7555 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

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

Generating metadata
[|]
... completed

Publishing repository over HTTP
[-]
... skipped

Publishing repository over HTTPS
[-]
... completed

Successfully synchronized repository

[root@preethi ~]#
Comment 7 Preethi Thomas 2013-01-07 09:09:42 EST
Pulp 2.0 released.

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