Bug 707633 - [RFE] cancel sync does not cancel syncs on cloned repos
Summary: [RFE] cancel sync does not cancel syncs on cloned repos
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 28
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
: 708374 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-25 15:06 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:12:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-05-25 15:06:52 UTC
Description of problem:
Looks like if the repo is cloned, cancel_sync fails to cancel a sync.

Version-Release number of selected component (if applicable):

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

How reproducible:


Steps to Reproduce:
1. clone a repo with parent or origin feed
2. after clone completes run cancel_sync on the clone repo


  
Actual results:


Results running both on 2 different windows

[root@preethi ~]# pulp-admin repo cancel_sync --id=f15-cloneSync for repository f15-clone is being canceled


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

Item Details: 
Tree_Files: 5/5
Rpms: 2937/2937


[root@preethi ~]# pulp-admin repo cancel_sync --id=f15Sync for repository f15 is being canceled


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

Item Details: 
Tree_Files: 0/6
Rpms: 1239/2937
CancelException


[root@preethi ~]# pulp-admin repo cancel_sync --id=f14-clone
Sync for repository f14-clone is being canceled


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

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

[root@preethi ~]# pulp-admin repo cancel_sync --id=f14
Sync for repository f14 is being canceled


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

Item Details: 
Tree_Files: 0/7
Rpms: 167/2766
CancelException





Expected results:


Additional info:

Comment 1 Preethi Thomas 2011-05-27 13:10:06 UTC
Sorry about the vague description above.

.
 Steps to Reproduce:
1. clone a repo with parent or origin feed (say clone1)
2. wait for the clone to finish.
3. run repo sync on the cloned repo  (repo sync --id=clone1)
2.  run cancel_sync on the cloned repo (repo cancel_sync --id=clone1)

Comment 2 Preethi Thomas 2011-05-27 13:53:06 UTC
Also failing this case

Description of problem:
running cancel_sync does not cancel sync on a repo that is being cloned

Version-Release number of selected component (if applicable):

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

How reproducible:


Steps to Reproduce:
1. run repo clone # pulp-admin repo clone --id=f15 --clone_id=f15-clone -F
2. while the cloning is in progress
3.run cancel_sync on the clone repo ( pulp-admin repo cancel_sync
--id=f15-clone)
There is no sync in progress for this repository


Actual results:
[root@preethi ~]# pulp-admin repo cancel_sync --id=f15-clone
There is no sync in progress for this repository


Expected results:


Additional info:

Comment 3 Preethi Thomas 2011-05-27 13:54:06 UTC
*** Bug 708374 has been marked as a duplicate of this bug. ***

Comment 4 Sayli Karmarkar 2011-09-30 09:35:13 UTC
Following changes are done to fix these issues: 

- Addition of repo cancel_clone command to cancel running clone gracefully
- Fixed cancel_sync on a cloned repo
- Added functionality to snapshot and restart clone (persistent clones)

Comment 5 Sayli Karmarkar 2011-10-03 16:30:27 UTC
commit c2ea37fe52a94ebbaf92eb693e621834ea83eead
Author: Sayli Karmarkar <skarmark>
Date:   Mon Oct 3 09:33:45 2011 -0700

    707633 - Addition of repo cancel_clone command to cancel running clone gracefully

Comment 6 Jeff Ortel 2011-10-03 20:28:21 UTC
build: 0.237-2

Comment 7 Preethi Thomas 2011-10-04 13:33:37 UTC
fails_qa

the scenario in comment#2 still fails.

Steps to Reproduce:
1. run repo clone # pulp-admin repo clone --id=f15 --clone_id=f15-clone -F
2. while the cloning is in progress
3.run cancel_sync on the clone repo ( pulp-admin repo cancel_sync
--id=f15-clone)

[root@preethi ~]# pulp-admin repo clone --id=f14 --clone_id=f14-clone4 --feed=origin -F
Repository [f14] is being cloned as [f14-clone4]
Clone: Finished
Item Details: 
Tree_File: 7/7
Rpm: 2766/2766


[root@preethi ~]# pulp-admin repo cancel_sync --id=f14-clone4
There is no sync in progress for this repository

Comment 8 Sayli Karmarkar 2011-10-04 16:24:16 UTC
As mentioned in comment#4, cancel_sync during cloning is now replaced by "cancel_clone". Moving back to on_qa.


(In reply to comment #7)
> fails_qa
> 
> the scenario in comment#2 still fails.
> 
> Steps to Reproduce:
> 1. run repo clone # pulp-admin repo clone --id=f15 --clone_id=f15-clone -F
> 2. while the cloning is in progress
> 3.run cancel_sync on the clone repo ( pulp-admin repo cancel_sync
> --id=f15-clone)

Comment 9 Preethi Thomas 2011-10-04 16:33:26 UTC
fails_qa
while running cancel_clone on a repo that is being cloned gets the following exception

[root@preethi ~]# pulp-admin repo cancel_clone  --id=f14-clone 
Clone for this repository f14-clone is being canceled

[root@preethi ~]# pulp-admin repo clone --id=f14 --clone_id=f14-clone --feed=origin -F
Repository [f14] is being cloned as [f14-clone]
Clone: Error
Item Details: 
Tree_File: 0/7
Rpm: 304/2766
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 23, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/lib/cli.py", line 152, in main
    command.main(self.args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 129, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 211, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/repo.py", line 614, in run
    self.clone_foreground(task)
  File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/repo.py", line 583, in clone_foreground
    raise SyncError(task['traceback'][-1])
repo.SyncError: OSError: [Errno 2] No such file or directory: '/var/lib/pulp//repos/f14-clone//Packages'

[root@preethi ~]#

Comment 10 Preethi Thomas 2011-10-04 17:46:50 UTC
moving to verified as the above issue was moved to another bug

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

[root@preethi ~]# pulp-admin repo clone --id=f14-clone1 --clone_id=f14-clone-new -F
Repository [f14-clone1] is being cloned as [f14-clone-new]
Clone: Canceled
Item Details: 
Tree_File: 0/6
Rpm: 821/2741

[root@preethi ~]# pulp-admin repo clone --id=f14-clone1 --clone_id=f14-clone-new --feed=parent  -F
Repository [f14-clone1] is being cloned as [f14-clone-new]
Clone: Canceled
Item Details: 
Tree_File: 0/6
Rpm: 346/2741

[root@preethi ~]# pulp-admin repo clone --id=f14-clone1 --clone_id=f14-clone-new --feed=None  -F
Repository [f14-clone1] is being cloned as [f14-clone-new]
Clone: Canceled
Item Details: 
Tree_File: 0/6
Rpm: 345/2741

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


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