Project

Profile

Help

Issue #2680

closed

Scheduled RPM installation and uninstallation does not work at all

Added by rschneider almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
2.12.2
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

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.

Actions #1

Updated by rschneider almost 7 years ago

Actions #2

Updated by bmbouter almost 7 years ago

  • Status changed from NEW to POST
  • Assignee set to rschneider

Added by rschneider almost 7 years ago

Revision a8a11960 | View on GitHub

[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

Added by rschneider almost 7 years ago

Revision a8a11960 | View on GitHub

[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

Actions #3

Updated by rschneider almost 7 years ago

  • Status changed from POST to MODIFIED
Actions #4

Updated by bmbouter almost 7 years ago

Posting pulp-smash test plan based on the issue description.

Actions #5

Updated by bizhang almost 7 years ago

  • Platform Release set to 2.12.2
Actions #6

Updated by bizhang almost 7 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by bizhang almost 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #8

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF