You can't POST a sync request: curl -k -u admin:admin -X POST https://localhost/pulp/api/repositories/some-repo-id/sync/ 2011-01-18 11:36:50,879 [ERROR][Dummy-3] report_error() @ base.py:61 - Traceback (most recent call last): File "/home/mmccune/devel/pulp/src/pulp/server/webservices/controllers/base.py", line 57, in report_error return method(self, *args, **kwargs) File "/home/mmccune/devel/pulp/src/pulp/server/webservices/role_check.py", line 131, in check_roles result = f(instance, *fargs, **kw) File "/home/mmccune/devel/pulp/src/pulp/server/webservices/controllers/repositories.py", line 292, in sync task = self.start_task(api._sync, [id, repo_params['skip']], KeyError: 'skip' should use get() instead of direct access: diff --git a/src/pulp/server/webservices/controllers/repositories.py b/src/pulp/server/webservices/controllers/repo index 62bb0b7..4128e91 100644 --- a/src/pulp/server/webservices/controllers/repositories.py +++ b/src/pulp/server/webservices/controllers/repositories.py @@ -289,7 +289,7 @@ class RepositoryActions(AsyncController): """ repo_params = self.params() timeout = self.timeout(repo_params) - task = self.start_task(api._sync, [id, repo_params['skip']], + task = self.start_task(api._sync, [id, repo_params.get('skip')], timeout=timeout, unique=True, task_type=RepoSyncTask)
commit 2fb94021c6b5910a53f046015ef54e928dd7b7f6 Author: Mike McCune <mmccune> Date: Tue Jan 18 11:48:51 2011 -0800 670610 - ensure that parameter dictionary access is key safe
*** Bug 670694 has been marked as a duplicate of this bug. ***
Fixed in 0.130.
Trying to verify Mike could you please see if this is what is expected? [root@preethi ~]# curl -k -u admin:admin -X POST https://localhost/pulp/api/repositories/f13/sync/ {"scheduled_time": 0, "exception": null, "status_path": "/pulp/api/repositories/f13/sync/6130655c-28b8-11e0-9824-002564a85a58/", "finish_time": null, "start_time": null, "traceback": null, "method_name": "_sync", "state": "waiting", "result": null, "progress": null, "id": "6130655c-28b8-11e0-9824-002564a85a58"}[root@preethi ~]# [root@preethi ~]#
[root@preethi ~]# curl -k -u admin:admin -X POST https://localhost/pulp/api/repositories/fedora-repo-with-czech-name/sync/ {"scheduled_time": 0, "exception": null, "status_path": "/pulp/api/repositories/fedora-repo-with-czech-name/sync/10903768-4bf6-11e0-9c07-002564a85a58/", "finish_time": null, "start_time": null, "traceback": null, "method_name": "_sync", "state": "waiting", "result": null, "progress": null, "id": "10903768-4bf6-11e0-9c07-002564a85a58"}[
verified[root@preethi ~]# rpm -q pulp pulp-0.0.146-1.fc14.noarch
Closing with Community Release 15 pulp-0.0.223-4.