Bug 627737
Summary: | Cancelling a repo sync, doesn't cancel the repo sync | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Jason Connor <jconnor> |
Component: | z_other | Assignee: | Jason Connor <jconnor> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | wes hayutin <whayutin> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | unspecified | CC: | jconnor, jmatthew, mmccune, pkilambi, pthomas |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 13:59:11 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 641987 |
Description
Jason Connor
2010-08-26 19:27:16 UTC
Grinder has a 'stop' method that will tell all spawned threads to stop after they've finished the package they are downloading. YumRepoGrinder.stop() is the method to invoke for 'yum' feeds. RHNSync.stop() is the method to invoke for 'rhn' feeds. monkey patched paython's stdlib threading module in order to track thread hierarchy and cancel not only a task's thread, but any child threads it may have spawned. fails_qa [root@preethi pulp]# rpm -qa |grep pulp pulp-0.0.61-1.fc13.noarch pulp-client-0.0.61-1.fc13.noarch pulp-common-0.0.61-1.fc13.noarch You have new mail in /var/spool/mail/root [root@preethi pulp]# rpm -qa |grep grinder grinder-0.0.60-1.fc13.noarch I ran repo sync in one terminal window and while its running I cancelled the sync from another terminal window. Even though I got the cancelled sync message ,the sync continued and finished successfully. root@preethi ~]# pulp-admin repo cancel_sync --id=f13 --taskid=58211bd7-bf60-11df-a0a9-002564a85a58 Sync task 58211bd7-bf60-11df-a0a9-002564a85a58 cancelled [root@preethi pulp]# pulp-admin repo sync --id=f13 Task created with ID:: 58211bd7-bf60-11df-a0a9-002564a85a58 Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: finished Sync Successful. Repo [ f13 ] now has a total of [ 3102 ] packages Fixed another bug that was introduced by using weak references. This should be (again) fixed. fails_qa I started a sync for a repo, and while it was running, I did a cancel_sync for that repo. I got the sync task cancelled message but the actual sync continued and finised. [root@preethi ~]# pulp-admin -u admin -p admin repo sync --id=f13 Task created with ID:: ac84bf0c-c1ab-11df-804b-002564a85a58 Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: running Sync Status:: finished Sync Successful. Repo [ f13 ] now has a total of [ 3102 ] packages You have new mail in /var/spool/mail/root [root@preethi ~]# pulp-admin -u admin -p admin repo cancel_sync --id=f13 --taskid=ac84bf0c-c1ab-11df-804b-002564a85a58 Sync task ac84bf0c-c1ab-11df-804b-002564a85a58 cancelled You have new mail in /var/spool/mail/root Fixed in build 0.76. verified [root@preethi ~]# pulp-admin repo status --id=f13 +------------------------------------------+ Status for f13 +------------------------------------------+ Repository: f13 Number of Packages: 3102 Last Sync: 2010-10-27 11:57:16.131000 [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin repo sync --id=f13 -F Sync for repository f13 started You can safely CTRL+C this current command and it will continue [== ] 5% (181 of 3111 pkgs) Sync: Canceled [root@preethi ~]# pulp-admin repo status --id=f13 +------------------------------------------+ Status for f13 +------------------------------------------+ Repository: f13 Number of Packages: 3102 Last Sync: 2010-10-27 11:57:16.131000 [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin repo cancel_sync --id=f13 Sync for repository f13 canceled Closing with Community Release 15 pulp-0.0.223-4. |