Bug 681304

Summary: repo sync failing with Type error
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 21   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:11:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

Description Preethi Thomas 2011-03-01 18:24:40 UTC
Description of problem:

[root@preethi ~]#  rpm -qa |grep pulp
pulp-0.0.143-1.fc14.noarch
pulp-client-0.0.143-1.fc14.noarch
pulp-common-0.0.143-1.fc14.noarch
[root@preethi ~]#  rpm -q grinder
grinder-0.0.81-1.fc14.noarch


root@preethi ~]# pulp-admin -u admin -p test repo create --id=f13 --feed=yum:http://download.devel.redhat.com/released/F-13/GOLD/Fedora/x86_64/os/
Successfully created repository [ f13 ]

[root@preethi ~]# pulp-admin -u admin -p test repo sync --id=f13 -FSync for repository f13 started
Sync: Error

Item Details: 
Tree_Files: 0/2
Rpms: 0/3102
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'


[root@preethi ~]# pulp-admin -u admin -p test repo sync --id=f14 -F
Sync for repository f14 started
Sync: Error

Item Details: 
Tree_Files: 0/2
Rpms: 0/2766
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'




2011-03-01 13:23:34,956 [ERROR][Dummy-4] create_symlinks() @ util.py:324 - Create symlink for [/var/lib/pulp//repos/released/F-13/GOLD/Fedora/x86_64/os] to [/var/lib/pulp/published/repos/released/F-13/GOLD/Fedora/x86_64/os]
2011-03-01 13:23:43,329 [INFO][Thread-123] _sync() @ repo.py:1308 - Sync of f13 starting, skip_dict = {}
2011-03-01 13:23:46,444 [ERROR][Thread-123] failed() @ task.py:207 - Task id:09ff9d7a-4431-11e0-94be-002564a85a58, method_name:_sync:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/tasking/task.py", line 131, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 1316, in _sync
    synchronizer)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo_sync.py", line 103, in sync
    repo_dir = synchronizer.sync(repo, repo_source, skip_dict, progress_callback)
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo_sync.py", line 434, in sync
    report = self.yum_repo_grinder.fetchYumRepo(store_path, callback=progress_callback)
  File "/usr/lib/python2.7/site-packages/grinder/RepoFetch.py", line 326, in fetchYumRepo
    self.fetchPkgs.addItemList(self.downloadinfo)
  File "/usr/lib/python2.7/site-packages/grinder/ParallelFetch.py", line 102, in addItemList
    self.addItem(p)
  File "/usr/lib/python2.7/site-packages/grinder/ParallelFetch.py", line 97, in addItem
    self._update_totals(item)
  File "/usr/lib/python2.7/site-packages/grinder/ParallelFetch.py", line 87, in _update_totals
    self.details[item_type]["size_left"] += item['size']
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'

Comment 1 John Matthews 2011-03-07 18:58:28 UTC
Fixed in grinder 0.83

Issue was related to syncing a repository with tree files defined but no size noted.  This is standard behavior for Fedora/RHEL tree file metadata, so it's a valid bug in grinder and had to be addressed.

Comment 2 Jeff Ortel 2011-03-07 20:43:25 UTC
Build: 0.145

Comment 3 Preethi Thomas 2011-03-08 15:23:41 UTC
[root@nec-em8 ~]# rpm -q pulp
pulp-0.0.145-1

[root@nec-em8 ~]# pulp-admin repo sync --id=f14 -F
error: operation failed: Invalid SSL Certificate
[root@nec-em8 ~]# pulp-admin -u admin -p admin repo sync --id=f14 -F
Sync for repository f14 started
Step: Downloading Items or Verifying
[=========================] 100%
Step: Downloading Items or Verifying
Step: Downloading Items or Verifying
Sync: Finished
2773/2773 new items downloaded
0/2773 existing items processed

Item Details: 
Tree_Files: 7/7
Rpms: 2766/2766

Comment 4 Preethi Thomas 2011-08-16 12:11:30 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:58 UTC
Closing with Community Release 15

pulp-0.0.223-4.