Bug 707341

Summary: Not able to run repo sync cli on repos which has schedules
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Jason Connor <jconnor>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jortel, mmccune
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-16 14:03:15 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: 641987    

Description Preethi Thomas 2011-05-24 18:07:38 UTC
Description of problem:
Looks like we repo sync can not be run on repos which has schedules.

[root@preethi ~]# pulp-admin repo create --id=fedora15 --feed=http://download.devel.redhat.com/released/F-15/Beta/Fedora/x86_64/os/ --interval=P1D --start=2011-05-24T15:30:00-05:00 --runs=2
Successfully created repository [ fedora15 ]

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

Id                 	local-repo               
Name               	local-repo               
Feed URL           	None                     
Feed Type          	None                     
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}             

Id                 	fedora15                 
Name               	fedora15                 
Feed URL           	http://download.devel.redhat.com/released/F-15/Beta/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	R2/2011-05-24T16:30:00-04:00/P1D
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       




[root@preethi ~]# pulp-admin repo status --id=fedora15
+------------------------------------------+
             Status for fedora15
+------------------------------------------+
Repository: fedora15
Number of Packages: 0
Last Sync: never
Currently syncing: progress unknown

[root@preethi ~]# pulp-admin repo sync --id=fedora15 -F
Sync for repository fedora15 already in progress
Waiting /

Comment 1 Jason Connor 2011-05-25 05:52:32 UTC
fixed client to use new server-side metadata to better determine if a sync is actually currently progress
fix pushed in 5a326c7ab412918f82fe3e2e729fbba43259ab2a

Comment 2 Jason Connor 2011-05-25 15:18:19 UTC
for this fix, you'll need the all of the follow commits:
449eb7f284626d3049b490050665b24f7e653315
a80f4e832617fe3105d41ad6d7169f6c96d8c28e
3e5ae268444ab89c830d184629d403457ca91144

Comment 3 Jeff Ortel 2011-05-25 19:55:03 UTC
build: 0.181

Comment 4 Preethi Thomas 2011-05-26 12:36:57 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.181-1.fc14.noarch
[root@preethi ~]# 


[root@preethi ~]#  pulp-admin repo create --id=f14 --feed=http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/ --interval PT1H --start=2011-05-26T09:30:00-05:00:00 
Successfully created repository [ f14 ]

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

Id                 	f14                      
Name               	f14                      
Feed URL           	http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
Feed Type          	remote                   
Feed Certs         	CA:No   Cert:No   Key:No
Consumer Certs     	CA:No   Cert:No   Key:No
Architecture       	noarch                   
Sync Schedule      	2011-05-26T10:30:00-04:00/PT1H
Packages           	0                        
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       


[root@preethi ~]# pulp-admin repo sync --id=f14 -F
Sync for repository f14 started
Sync: Finished
2773/2773 new items downloaded
0/2773 existing items processed

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

Comment 5 Preethi Thomas 2011-08-16 14:03:15 UTC
Closing with Community Release 15

pulp-0.0.223-4.