Bug 695707 - repo delete doesn't not cancel ongoing sync
Summary: repo delete doesn't not cancel ongoing sync
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: Sprint 23
Assignee: Sayli Karmarkar
QA Contact: dgao
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close 684061 697956
TreeView+ depends on / blocked
 
Reported: 2011-04-12 13:36 UTC by dgao
Modified: 2015-03-23 01:10 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description dgao 2011-04-12 13:36:05 UTC
[root@pulp-qe-sandbox httpd]# pulp-admin repo create --id=foo --feed=yum:http://download.devel.redhat.com/released/RHEL-6/6.0/Server/x86_64/os/
Successfully created repository [ foo ]

[root@pulp-qe-sandbox httpd]# pulp-admin repo sync --id=foo
Sync for repository foo started
Use "repo status" to check on the progress

[root@pulp-qe-sandbox httpd]# pulp-admin repo status --id=foo
+------------------------------------------+
               Status for foo
+------------------------------------------+
Repository: foo
Number of Packages: 0
Last Sync: never
Currently syncing: 0% done (50 of 3397 packages downloaded)

[root@pulp-qe-sandbox httpd]# pulp-admin repo delete --id=foo
Successful deleted repository [ foo ]

[root@pulp-qe-sandbox httpd]# pulp-admin repo status --id=foo
error: operation failed: No repository foo


NetHogs version 0.7.0

  PID USER     PROGRAM                      DEV        SENT      RECEIVED       
7459  apache   (wsgi:pulp)                  eth0      23.749    1154.547 KB/sec
...

Comment 1 dgao 2011-04-12 13:37:23 UTC
To further verify that the sync is not stopped after repo delete, we can tail the grinder log to see the fetching of content.

Comment 2 Sayli Karmarkar 2011-04-14 22:51:00 UTC
$ sudo pulp-admin repo delete --id=foo
Repo [ foo ] cannot be deleted because of sync in progress. You can cancel ongoing sync using 'repo cancel_sync' command.

Comment 3 dgao 2011-04-15 14:48:06 UTC
[root@pulp-nightly httpd]# 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 httpd]# pulp-admin repo sync --id=foo -F
Sync for repository foo started
Step: Downloading Items or Verifying
[                         ] 0%
Tree_Files: 0/7
Rpms: 36/2766
Total: 36/2773 items
^C

[root@pulp-nightly httpd]# pulp-admin repo delete --id=foo
Repo [ foo ] cannot be deleted because of sync in progress. You can cancel ongoing sync using 'repo cancel_sync' command.
[root@pulp-nightly httpd]# pulp-admin repo cancel_sync --id=foo
Sync for repository foo canceled

[root@pulp-nightly httpd]# pulp-admin repo delete --id=foo
Repo [ foo ] cannot be deleted because of sync in progress. You can cancel ongoing sync using 'repo cancel_sync' command.

Nethogs show no activity after cancel_sync..but we still can't remove the repo.

Comment 4 Sayli Karmarkar 2011-04-21 08:44:09 UTC
I am reverting initial fix for this bug to move it from client to server side. Server side changes are causing a lot of api tests to break as lot of our api tests are not waiting for repo syncs to finish before deleting repos. I am working on fixing these api tests and server side fix.

Comment 5 Sayli Karmarkar 2011-04-28 16:24:55 UTC
Fixed in server side api.

Comment 6 Jeff Ortel 2011-05-04 15:41:51 UTC
build: 0.173

Comment 7 dgao 2011-05-10 19:33:34 UTC
[root@pulp-nightly pulp]# pulp-admin repo create --id=foo --feed=yum:http://download.devel.redhat.com/released/RHEL-6/6.0/Server/x86_64/os/
Successfully created repository [ foo ]

[root@pulp-nightly pulp]# pulp-admin repo sync --id=foo
Sync for repository foo started
Use "repo status" to check on the progress
[root@pulp-nightly pulp]# pulp-admin repo sync --id=foo -F
Sync for repository foo already in progress
Step: Downloading Items or Verifying
[                         ] 1%
Tree_Files: 0/6
Rpms: 159/3391
Total: 159/3397 items
^C

[root@pulp-nightly pulp]# pulp-admin repo delete --id=foo
error: operation failed: PulpException: "Repo cannot be deleted because of sync in progress. You can cancel ongoing sync using 'repo cancel_sync' command."
[root@pulp-nightly pulp]# pulp-admin repo cancel_sync --id=foo
Sync for repository foo canceled

[root@pulp-nightly pulp]# pulp-admin repo delete --id=foo
Successful deleted repository [ foo ]

Comment 8 Preethi Thomas 2011-08-16 12:06:18 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 9 Preethi Thomas 2011-08-16 12:20:30 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.