Bug 662680

Summary: ZeroDivisionError on repo sync with --no-packages
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Jason Connor <jconnor>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: mmccune, pkilambi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-15 15:14:28 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 2010-12-13 15:42:50 UTC
Description of problem:
[root@preethi ~]# rpm -q pulp
pulp-0.0.114-1.fc14.noarch


[root@preethi ~]# pulp-admin repo sync   --no-packages --id=f13 -F Sync for repository f13 started
You can safely CTRL+C this current command and it will continue
Traceback (most recent call last):                    ] 0%
  File "/usr/bin/pulp-admin", line 130, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/cli/base.py", line 99, in main
    command.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 117, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 210, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 524, in run
    self.sync_foreground(task)
  File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 488, in sync_foreground
    self.print_sync_progress(task['progress'])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 464, in print_sync_progress
    portion = done / total
ZeroDivisionError: float division by zero

Comment 1 Pradeep Kilambi 2010-12-13 16:38:42 UTC
*** Bug 651900 has been marked as a duplicate of this bug. ***

Comment 2 Jason Connor 2011-01-04 20:21:21 UTC
added a check for 0 total packages

Comment 3 Jay Dobies 2011-01-05 19:45:19 UTC
Fixed in 0.120.

Comment 4 Preethi Thomas 2011-01-05 22:15:25 UTC
fails_qa

[root@preethi ~]# rpm -q pulp
pulp-0.0.120-1.fc14.noarch
[root@preethi ~]# 

running repo sync with --no-packages option on a newly created repo fails OS Error: No such file or directory

 

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

[root@preethi ~]# pulp-admin repo sync   --no-packages --id=f13 -FSync for repository f13 started
You can safely CTRL+C this current command and it will continue
[==================================================] 100% (9 of 9 pkgs)
Sync: Error
OSError: [Errno 2] No such file or directory: '/var/lib/pulp/repos/released/F-13/GOLD/Fedora/x86_64/os//Packages'

Comment 5 Jason Connor 2011-01-06 17:05:00 UTC
This is a new bug in the way of testing the fix, a new bug report has been filed:
https://bugzilla.redhat.com/show_bug.cgi?id=667753

Comment 6 Jay Dobies 2011-01-07 19:22:00 UTC
Fixed in build 0.122.

Comment 7 Preethi Thomas 2011-01-07 21:01:14 UTC
Moving back to modified as the bug 

https://bugzilla.redhat.com/show_bug.cgi?id=667753

is not fixed

Comment 8 Jay Dobies 2011-01-12 19:37:03 UTC
Fixed in build 0.123.

Comment 9 Preethi Thomas 2011-02-23 14:10:41 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.140-1.fc14.noarch



[root@preethi ~]#  pulp-admin -u admin -p redhat repo sync --id=f13 --no-packages -F
Sync for repository f13 started
Sync: Finished
0/9 new items downloaded
9/9 existing items processed

Item Details: 
Tree_Files: 9/9

Comment 10 Preethi Thomas 2011-08-15 15:14:28 UTC
Closing with current community release

pulp-0.0.223