Bug 670327 - Cloning a feedless repo produces a traceback
Summary: Cloning a feedless repo produces a traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2011-01-17 21:37 UTC by dgao
Modified: 2011-08-16 13:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 13:59:52 UTC
Embargoed:


Attachments (Terms of Use)

Description dgao 2011-01-17 21:37:40 UTC
[root@pulp-nightly ~]# pulp-admin repo create --id=foo
Successfully created repository [ foo ]

[root@pulp-nightly ~]# pulp-admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	foo                      
Name               	foo                      
FeedURL            	None                     
FeedType           	None                     
Arch               	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     


[root@pulp-nightly ~]# pulp-admin repo sync --id=foo
error: operation failed: Repo [foo] is not setup for sync. Please add packages using upload.
[root@pulp-nightly ~]# pulp-admin repo clone --id=foo --clone_id=bar -F
Repository [foo] is being cloned as [bar]
You can safely CTRL+C this current command and it will continue
Traceback (most recent call last):                    ] 0%
  File "/usr/bin/pulp-admin", line 147, in <module>
    admin.main()
  File "/usr/lib/python2.6/site-packages/pulp/client/cli/base.py", line 98, in main
    command.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/base.py", line 118, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/base.py", line 229, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/repo.py", line 350, in run
    self.clone_foreground(task)
  File "/usr/lib/python2.6/site-packages/pulp/client/core/repo.py", line 318, in clone_foreground
    self.print_clone_progress(task['progress'])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/repo.py", line 294, in print_clone_progress
    portion = done / total
ZeroDivisionError: float division
[root@pulp-nightly ~]#

Comment 1 Jason Connor 2011-01-18 16:03:06 UTC
I abstracted the progress reporting into a new base class: RepoProgressAction, so that bugs found in the progress reporting will not be filed twice: once for sync and once for clone.

Comment 2 dgao 2011-01-18 16:28:41 UTC
Verified

pulp-admin repo create --id=feedless_repo
Successfully created repository [ feedless_repo ]

pulp-admin repo clone --id=feedless_repo --clone_id=feedless_clone_repo --feed=feedless -F

Repository [feedless_repo] is being cloned as [feedless_clone_repo]
You can safely CTRL+C this current command and it will continue
[=========================] 100% Total: 0/0 items )
Clone: Finished

Comment 3 Preethi Thomas 2011-01-18 17:14:43 UTC
on_qa now
build 128

Comment 4 Preethi Thomas 2011-01-18 17:15:22 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.128-1.fc14.noarch

[root@preethi ~]# pulp-admin repo create --id=foo
Successfully created repository [ foo ]

[root@preethi ~]# pulp-admin repo clone --id=foo --clone_id=bar -F
Repository [foo] is being cloned as [bar]
You can safely CTRL+C this current command and it will continue
[=========================] 100% Total: 0/0 items )
Clone: Finished

Comment 5 Preethi Thomas 2011-08-16 13:59:52 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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