Bug 670516 - cancel sync failing
Summary: cancel sync failing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2011-01-18 14:48 UTC by Preethi Thomas
Modified: 2011-08-16 14:01 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:01:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-01-18 14:48:07 UTC
Description of problem:


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

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


[root@preethi ~]# pulp-admin repo cancel_sync --id=f14
No sync to cancel


From the pulp.log

2011-01-18 09:49:56,394 [ERROR][Dummy-85] report_error() @ base.py:61 - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 57, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 658, in GET
    tasks = [t for t in find_async(method_name=action_methods[action_name])
TypeError: 'NoneType' object is not callable




2011-01-18 09:50:02,244 [ERROR][Dummy-2] report_error() @ base.py:61 - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 57, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 658, in GET
    tasks = [t for t in find_async(method_name=action_methods[action_name])
TypeError: 'NoneType' object is not callable

2011-01-18 09:50:15,998 [INFO][Thread-118] sync() @ repo_sync.py:387 - YumSynchronizer reported 2773 successes, 0 downloads, 0 errors
2011-01-18 09:50:19,152 [INFO][Thread-118] create() @ distribution.py:47 - Distribution with id ks-f14-x86_64 already exists
2011-01-18 09:50:19,652 [INFO][Thread-118] add_packages_from_dir() @ repo_sync.py:205 - Loaded group info from /var/lib/pulp/repos/released/F-14/GOLD/Fedora/x86_64/os/repodata/1d46a2073097bdb6b7b6f6fba60e4525ca0bf2d1165026a3e1c87b0b2abaf07f-Fedora-14-comps.xml
2011-01-18 09:50:19,653 [INFO][Thread-118] add_packages_from_dir() @ repo_sync.py:225 - Skipping errata imports from sync process
2011-01-18 09:50:19,654 [INFO][Thread-118] _sync() @ repo.py:1172 - Sync returned 2766 packages, 0 errata
2011-01-18 09:50:41,907 [INFO][Thread-118] _sync() @ repo.py:1193 - Examining 0 errata from repo f14


First traceback is when I run repo sync and second one is when I call cancel_sync

Comment 1 Jason Connor 2011-01-18 15:31:46 UTC
the cancel_async and find_async functions were being lazily initialized, but if some imported them before that initialization, they'd be set to None

changed them to actual functions

Comment 2 Jay Dobies 2011-01-18 16:08:08 UTC
Fixed in 0.127.

Comment 3 Preethi Thomas 2011-01-18 16:11:28 UTC
verified

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


[root@preethi repo-dir]#  pulp-admin -u admin -p admin repo create --id=f13 --name=f13 --arch=x86_64 --feed=yum:http://download.devel.redhat.com/released/F-13/GOLD/Fedora/x86_64/os/
Successfully created repository [ f13 ]

[root@preethi repo-dir]# pulp-admin repo sync --id=f13 -FSync for repository f13 started
You can safely CTRL+C this current command and it will continue
[                         ] 0% Total: 1/3111 items (0/9<tree_files> 1/3102[                         ] 0% Total: 46/3111 items (0/9<tree_files> 46/31[                         ] 2% Total: 101/3111 items (0/9<tree_files> 101/[                         ] 2% Total: 126/3111 items (0/9<tree_files> 126/[                         ] 2% Total: 135/3111 items (0/9<tree_files> 135/[                         ] 3% Total: 151/3111 items (0/9<tree_files> 151/[                         ] 3% Total: 162/3111 items (0/9<tree_files> 162/[                         ] 3% Total: 173/3111 items (0/9<tree_files> 173/[                         ] 3% Total: 187/3111 items (0/9<tree_files> 187/[                         ] 3% Total: 201/3111 items (0/9<tree_files> 201/[=                        ] 4% Total: 211/3111 items (0/9<tree_files> 211/[=                        ] 4% Total: 229/3111 items (0/9<tree_files> 229/[=                        ] 7% Total: 254/3111 items (0/9<tree_files> 254/3102<rpms>)
Sync: Canceled

[root@preethi repo-dir]# pulp-admin repo sync --id=f13
Sync for repository f13 started
Use "repo status" to check on the progress

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


[root@preethi repo-dir]# pulp-admin repo status --id=f13
+------------------------------------------+
               Status for f13
+------------------------------------------+
Repository: f13
Number of Packages: 0
Last Sync: never

Comment 4 Preethi Thomas 2011-08-16 14:01:12 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.