Bug 697971 - pulp-admin cancel_sync always return sync complete on the subsequent syncs.
Summary: pulp-admin cancel_sync always return sync complete on the subsequent syncs.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: Sprint 23
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-04-19 19:37 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:09:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-04-19 19:37:19 UTC
Description of problem:
pulp-admin cancel_sync always return sync complete on the subsequent syncs.

pasting the irc conversation with sayli for reference


<preethi> sayli, cancel sync seems to be working for me in 168
<sayli> preethi, if this is the first sync on the repo, it will work
<preethi> oh ok
<preethi> sayli, yes
<preethi> sayli, I see what you are saying
<preethi> [root@preethi ~]# pulp-admin -u admin -p admin repo cancel_sync --id=f14-original
<preethi> Sync has completed
<sayli> preethi, ya, I think I know the issue..it's the same issue I was seeing in repo delete bug fix..sync_list is not returning latest sync first
<preethi> on my second attempt
<sayli> so we shd not be checking tasks[0] but checking tasks[len(tasks) - 1]
<preethi> sayli, i guess you will write it up then :)
<sayli> preethi, cool and assign it to me..

Comment 1 dgao 2011-04-19 19:49:26 UTC
[root@pulp-nightly ~]# pulp-admin repo create --id=foo --feed=yum:http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
Successfully created repository [ foo ]

[root@pulp-nightly ~]# pulp-admin repo sync --id=foo -F
Sync for repository foo started
Step: Downloading Items or Verifying
[=                        ] 4%
Tree_Files: 0/7
Rpms: 219/2766
Total: 219/2773 items
^C

[root@pulp-nightly ~]# pulp-admin repo cancel_sync --id=foo
Sync has completed

... wait about 30seconds 

[root@pulp-nightly ~]# nethogs


NetHogs version 0.7.0

  PID USER     PROGRAM                      DEV        SENT      RECEIVED       
29051 apache   (wsgi:pulp)                  eth0      62.723    2633.438 KB/sec

Comment 2 Sayli Karmarkar 2011-04-21 08:39:14 UTC
Fixed in commit 0940904f255330b6242d3202480d91794f560eff

Comment 3 Jeff Ortel 2011-04-21 21:30:06 UTC
build: 0.170

Comment 4 dgao 2011-04-25 14:12:44 UTC
[root@pulp-qe ~]# pulp-admin repo create --id=foo --feed=yum:http://download.devel.redhat.com/released/F-14/GOLD/Fedora/x86_64/os/
Successfully created repository [ foo ]

[root@pulp-qe ~]# pulp-admin repo sync --id=foo -F
Sync for repository foo started
Step: Downloading Items or Verifying
[                         ] 0%
Tree_Files: 0/7
Rpms: 29/2766
Total: 29/2773 items
^C

[root@pulp-qe ~]# pulp-admin repo cancel_sync --id=foo
Sync for repository foo canceled

... waited about 30seconds 


[root@pulp-qe ~]# pulp-admin repo sync --id=foo -F
Sync for repository foo started
Step: Downloading Items or Verifying
[                         ] 2%
Tree_Files: 0/7
Rpms: 98/2766
Total: 98/2773 items
^C

[root@pulp-qe ~]# pulp-admin repo cancel_sync --id=foo
Sync for repository foo canceled


[root@pulp-qe ~]# nethogs 
  PID USER     PROGRAM                      DEV        SENT      RECEIVED       
27927 qpidd    /usr/sbin/qpidd              eth0       0.087	   0.079 KB/sec

Comment 5 Preethi Thomas 2011-04-26 13:55:42 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.170-1.fc14.noarch

Reopening this as I a see a similar issue

1. Sync a repo
2. run cancel_sync
3. run cancel sync again

See the sync completed message the second time


[root@preethi ~]# pulp-admin repo sync --id=f14-original
Sync for repository f14-original started
Use "repo status" to check on the progress
[root@preethi ~]# pulp-admin repo cancel_sync --id=f14-original
Sync for repository f14-original canceled

[root@preethi ~]# pulp-admin repo cancel_sync --id=f14-original
Sync has completed
[root@preethi ~]# pulp-admin repo cancel_sync --id=f14-original
Sync has completed

Comment 6 Sayli Karmarkar 2011-04-26 18:13:50 UTC
Changed error message to a non-confusing one:

$ sudo pulp-admin repo cancel_sync --id=foo1
There is no sync in progress for this repository

Comment 7 Jay Dobies 2011-04-27 20:11:34 UTC
Fixed in Pulp 0.172, grinder 0.96.

Comment 8 Preethi Thomas 2011-05-03 18:32:33 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.172-1.fc14.noarch

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


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

Comment 9 Preethi Thomas 2011-08-16 12:09:03 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 10 Preethi Thomas 2011-08-16 12:21:47 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.