Actions
Issue #1116
closedScheduled sync raises TypeError
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Master
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
When a scheduled sync runs, a TypeError is raised.
0. start with a fresh/working dev checkout on master with at least the rpm plugin enabled.
1. create a repo
pulp-admin -u admin -p admin rpm repo create --repo-id zoo --relative-url zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo
2. create a scheduled sync to run every minute:
pulp-admin -u admin -p admin rpm repo sync schedules create --repo-id zoo --schedule 2015-06-06T14:29:00Z/PT1M
3. Observe the traceback:
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) Task pulp.server.managers.repo.sync.sync[567a6ce3-693c-4f9d-9136-9da1e5e3f234] raised unexpected: TypeError("sync() got an unexpected keyword argument 'overrides'",)
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) Traceback (most recent call last):
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) File "/usr/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/trace.py", line 240, in trace_task
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) R = retval = fun(*args, **kwargs)
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) File "/home/bmbouter/Documents/pulp/server/pulp/server/async/tasks.py", line 393, in __call__
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) return super(Task, self).__call__(*args, **kwargs)
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) File "/usr/lib/python2.7/site-packages/celery-3.1.11-py2.7.egg/celery/app/trace.py", line 437, in __protected_call__
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) return self.run(*args, **kwargs)
Jul 06 14:46:31 dhcp129-138.rdu.redhat.com pulp[32689]: celery.worker.job:ERROR: (32689-40128) TypeError: sync() got an unexpected keyword argument 'overrides'
Note that manually performing the sync works. I can do that with:
pulp-admin -u admin -p admin rpm repo create --repo-id zoo --relative-url zoo --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
When I do that I get:
Successfully created repository [zoo]
[bmbouter@dhcp129-138 pulp]$ pulp-admin -u admin -p admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
Synchronizing Repository [zoo]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Downloading metadata...
[|]
... completed
Downloading repository content...
[==================================================] 100%
RPMs: 32/32 items
Delta RPMs: 0/0 items
... completed
Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed
Importing errata...
[-]
... completed
Importing package groups/categories...
[-]
... completed
Task Succeeded
Initializing repo metadata
[-]
... completed
Publishing Distribution files
[-]
... completed
Publishing RPMs
[==================================================] 100%
32 of 32 items
... completed
Publishing Delta RPMs
... skipped
Publishing Errata
[==================================================] 100%
4 of 4 items
... completed
Publishing Comps file
[==================================================] 100%
3 of 3 items
... completed
Publishing Metadata.
[-]
... completed
Closing repo metadata
[-]
... completed
Generating sqlite files
... skipped
Publishing files to web
[-]
... completed
Writing Listings File
[-]
... completed
Task Succeeded
I thought perhaps the merging of PR 1940 introduced the issue, but when I checkout its parent commit 9e7485126ee0f1688b09086ad27bcd88b0c7677f the issue is also present. Using git-bisect would be a good tool to find the commit that introduced the regression.
Actions
scheduled tasks queue sync and publish instead of call
fixes #1116