[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 ...
To further verify that the sync is not stopped after repo delete, we can tail the grinder log to see the fetching of content.
$ 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.
[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.
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.
Fixed in server side api.
build: 0.173
[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 ]
Closing with Community Release 15 pulp-0.0.223-4.