Bug 706420

Summary: [RFE] Is cancel sync too polite?
Product: [Retired] Pulp Reporter: Pradeep Kilambi <pkilambi>
Component: user-experienceAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: medium    
Version: unspecifiedCC: skarmark
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: Sprint 26   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-24 20:12:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pradeep Kilambi 2011-05-20 14:08:49 UTC
Description of problem:

When we cancel a sync associated threads will not exit immediately and finishes the fetch its performing before relinquishing the thread. This is ok for smallers packages/files. But in File Sync case we can have an iso with 4G+ data thats being fetched and the sync will wait for the whole 4G to download before exiting.

This might defeat the point of cancel in an iso case as we might not want those G's down.

Would it make sense to have an option to kill the process immediately vs being polite.

Comment 1 John Matthews 2011-08-05 17:15:26 UTC
Commits Below:
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=ae7289b1d5bbbd36a71a0c35df1547396ad31c96

http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=613d8cad672196505baa3805ef1f52362490f430


QE:  Good test case would be to limit the bandwidth of a repo sync to something really low like 1kb.  Then when syncing a repo it should take a long time to fetch packages.

When you are ready to test the cancel, issue a 'cancel_sync', you will see a delay of a few seconds as the request is sent to pulp-server and is acted upon.

I would expect to see the actual sync canceled within a few seconds of this.

Comment 2 Jeff Ortel 2011-08-05 21:02:26 UTC
build: 0.222

Comment 3 Preethi Thomas 2011-09-02 18:06:58 UTC
verified

[root@preethi ~]# pulp-admin repo sync --id=f15 --limit=1 -F
Sync for repository f15 started
Sync: Cancelled

Item Details: 
Tree_Files: 0/6
Rpms: 654/2935

root@preethi ~]#  pulp-admin repo cancel_sync --id=f15
Sync for repository f15 is being cancel

Comment 4 Preethi Thomas 2012-02-24 20:12:58 UTC
Pulp v1.0 is released
Closed Current Release.