Issue #2680
closedScheduled RPM installation and uninstallation does not work at all
Description
Steps to reproduce¶
- Set up a blank Pulp 2.12 environment with at least one consumer
- Create an RPM repository (I used the Fedora "zoo" demo repo)
- Bind it to the consumer
- Schedule the installation of an RPM package
- Wait until the schedule triggers
- Check the results
I used the following exact pulp-admin command sequence for these steps (you need to adjust the date so it targets a point in time that's just a few minutes in the future, of course):
pulp-admin rpm repo create --repo-id=zoo --relative-url=zoo --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
pulp-admin rpm repo sync run --repo-id zoo
pulp-admin rpm repo publish run --repo-id zoo
pulp-admin rpm consumer bind --repo-id zoo --consumer-id myconsumer
pulp-admin rpm consumer package install schedules create --schedule R1/2017-03-29T14:20:00Z/PT1H --consumer-id myconsumer --name tiger
Expected result¶
When the time is reached, the schedule should trigger the creation of an install task, which is then executed by the consumer.
Actual result¶
No install task is created. Instead, a failed task shows up which apparently embodies the (attempted) execution of the schedule:
[root@pulpadmin /]# pulp-admin tasks list --all
+----------------------------------------------------------------------+
Tasks
+----------------------------------------------------------------------+
Operations:
Resources:
State: Failed
Start Time: 2017-03-29T14:20:00Z
Finish Time: 2017-03-29T14:20:00Z
Task Id: 6d699f0c-bc78-4dee-91c9-fb9dfc6f7576
[root@pulpadmin /]# pulp-admin tasks details --task-id 6d699f0c-bc78-4dee-91c9-fb9dfc6f7576
+----------------------------------------------------------------------+
Task Details
+----------------------------------------------------------------------+
Operations:
Resources:
State: Failed
Start Time: 2017-03-29T14:20:00Z
Finish Time: 2017-03-29T14:20:00Z
Result: N/A
Task Id: 6d699f0c-bc78-4dee-91c9-fb9dfc6f7576
Progress Report:
Traceback: Traceback (most recent call last): File
"/usr/lib/python2.7/site-packages/celery/app/trace.py", line
240, in trace_task R = retval = fun(*args, **kwargs)
File
"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py",
line 505, in __call__ return super(Task,
self).__call__(*args, **kwargs) File
"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py",
line 108, in __call__ return super(PulpTask,
self).__call__(*args, **kwargs) File
"/usr/lib/python2.7/site-packages/celery/app/trace.py", line
437, in __protected_call__ return self.run(*args,
**kwargs) TypeError: install_content() got an unexpected
keyword argument 'scheduled_call_id'
Scheduling a package update instead of an install ("rpm consumer package update schedules create") works as expected. Package uninstallation fails in the same way that package installation fails.
I have traced this problem to its most likely origin in the source code and fixed it successfully on a GitHub fork (whereby "successfully" means that it worked afterwards for install and uninstall for the very same reason that it already worked for updates - I don't know if the pretty simple fix, which basically boils down to adding an apparently useless optional parameter to a method, really is the desirable fix for this). I'll happily create a pull request as soon as I have an issue number to refer to in the commit.
[issue #2680]: Scheduled RPM (un)installation does not work (#2980)
fixes #2680 Scheduled RPM (un)installation does not work added myself to the AUTHORS file as requested by bmbouter