Bug 853196 - Cannot create schedule with P1M interval
Cannot create schedule with P1M interval
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.0.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 40
Assigned To: Jason Connor
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-30 13:15 EDT by Preethi Thomas
Modified: 2014-03-30 21:40 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 12:08:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Preethi Thomas 2012-08-30 13:15:29 EDT
Description of problem:
 Cannot create schedule with P1M interval.

Update seems to be working though

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create repo sync schedule with P1M interval
2.
3.
  
Actual results:
[root@pulp-candidate ~]#  pulp-admin repo sync schedules create --repo-id testing-pulp --schedule "2012-08-30T12:30:00Z/P1M"
An internal error occurred on the Pulp server. More information can be found in
the client log file ~/.pulp/admin.log.




Expected results:


[root@pulp-candidate ~]# tail -f ~/.pulp/server_calls.log

server log 

2012-08-30 13:13:25,909 - INFO - POST request to /pulp/api/v2/repositories/testing-pulp/importers/yum_importer/sync_schedules/ with parameters {"override_config": {}, "failure_threshold": null, "enabled": true, "schedule": "2012-08-30T12:30:00Z/P1M"}
2012-08-30 13:13:25,909 - INFO - Response status : 500 

2012-08-30 13:13:25,909 - INFO - Response body :
 {
  "exception": [
    "TypeError: integer argument expected, got float\n"
  ], 
  "traceback": [
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/middleware/exception.py\", line 44, in __call__\n    return self.app(environ, start_response)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/middleware/postponed.py\", line 38, in __call__\n    return self.app(environ, start_response)\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 277, in wsgi\n    result = self.handle_with_processors()\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 28, in _handle_with_processors\n    return process(self.processors)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in process\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 555, in processor\n    return handler()\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in <lambda>\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in process\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 570, in processor\n    result = handler()\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in <lambda>\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 27, in process\n    return self.handle()\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 228, in handle\n    return self._delegate(fn, self.fvars, args)\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 411, in _delegate\n    return f()\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 419, in <lambda>\n    f = lambda: self._delegate_sub_application(pat, what)\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 444, in _delegate_sub_application\n    return app.handle_with_processors()\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 28, in _handle_with_processors\n    return process(self.processors)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in process\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 555, in processor\n    return handler()\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in <lambda>\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in process\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 570, in processor\n    result = handler()\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 25, in <lambda>\n    return p(lambda : process(processors))\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py\", line 27, in process\n    return self.handle()\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 228, in handle\n    return self._delegate(fn, self.fvars, args)\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 409, in _delegate\n    return handle_class(cls)\n", 
    "  File \"/usr/lib/python2.7/site-packages/web/application.py\", line 385, in handle_class\n    return tocall(*args)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 138, in _auth_decorator\n    value = method(self, *args, **kwargs)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py\", line 462, in POST\n    schedule_id = execution.execute_sync(call_request)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/dispatch/task.py\", line 130, in _run\n    result = call(*args, **kwargs)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/managers/schedule/cud.py\", line 63, in create_sync_schedule\n    schedule_id = scheduler.add(call_request, **schedule_data)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/dispatch/scheduler.py\", line 223, in add\n    scheduled_call = ScheduledCall(call_request, schedule, **schedule_options)\n", 
    "  File \"/usr/lib/python2.7/site-packages/pulp/server/db/model/dispatch.py\", line 63, in __init__\n    self.first_run += interval\n", 
    "  File \"/usr/lib/python2.7/site-packages/isodate/duration.py\", line 173, in __radd__\n    newdt = other.replace(year=newyear, month=newmonth, day=newday)\n"
  ], 
  "_href": "/pulp/api/v2/repositories/testing-pulp/importers/yum_importer/sync_schedules/", 
  "error_message": "Unhandled Exception", 
  "http_request_method": "POST", 
  "http_status": 500
}





Additional info:
Comment 1 Jason Connor 2012-10-02 21:17:15 EDT
Pull request in for work around bug in isodate package
Comment 2 Jason Connor 2012-10-05 12:38:17 EDT
Pull request merged into master in revision:
57694336ab47fa990d82dfd502038e345a8f81dc
Comment 3 Jeff Ortel 2012-10-05 17:43:05 EDT
build: 0.331
Comment 4 Preethi Thomas 2012-10-10 13:59:59 EDT
verified

[root@pulp-master ~]# rpm -q pulp-rpm-server
pulp-rpm-server-0.0.331-1.fc17.noarch
[root@pulp-master ~]# 

[root@pulp-master ~]# pulp-admin -u admin -p admin rpm repo sync  schedules create --repo-id zoo --schedule 2014-01-01T00:00:00/P1M
Schedule successfully created

[root@pulp-master ~]# 
[root@pulp-master ~]# 
[root@pulp-master ~]# pulp-admin -u admin -p admin rpm repo sync  schedules create --repo-id zoo --schedule 2013-02-01T01:00:00/P1W
Schedule successfully created

[root@pulp-master ~]#
Comment 5 Preethi Thomas 2013-01-09 12:08:49 EST
Pulp v2.0 released

Note You need to log in before you can comment on or make changes to this bug.