This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 858672 - Schedules with monthly intervals don't calculate the next run correctly
Schedules with monthly intervals don't calculate the next run correctly
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: async/tasks (Show other bugs)
Master
Unspecified Unspecified
unspecified Severity unspecified
: ---
: Sprint 40
Assigned To: Jason Connor
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-19 07:55 EDT by Jay Dobies
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:07:47 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 Jay Dobies 2012-09-19 07:55:48 EDT
I have two schedules:

Schedule: 2014-01-01T00:00:00/P1M
Schedule: 2013-02-01T01:00:00/P1W

When I ask when the next run is, I see:

The next scheduled run is at 2012-10-01T00:00:00Z driven by the schedule
2014-01-01T00:00:00/P1M

I can see the reverse; if I put a schedule to start in 2011, calculating the next possible time based on the interval. But this feels a bit odd, I can't schedule something to start in the future if the interval is smaller than the time in advance that I schedule it.
Comment 1 Jay Dobies 2012-09-19 12:34:57 EDT
 [
  {
    "next_run": "2012-10-01T00:00:00Z",
    "_id": "505791088a905b3b7600001a",
    "first_run": "2012-10-01T00:00:00Z",
    "schedule": "2014-01-01T00:00:00/P1M",
    "enabled": false,
    "last_run": null,
    "failure_threshold": null,
    "override_config": {},
    "remaining_runs": null,
    "consecutive_failures": 0,
    "_href": "/pulp/api/v2/repositories/ps/importers/puppet_importer/sync_schedules/505791088a905b3b7600001a/"
  },
  {
    "next_run": "2013-02-01T06:00:00Z",
    "_id": "5058c1cb8a905b059f00006c",
    "first_run": "2013-02-01T06:00:00Z",
    "schedule": "2013-02-01T01:00:00/P1W",
    "enabled": true,
    "last_run": null,
    "failure_threshold": null,
    "override_config": {},
    "remaining_runs": null,
    "consecutive_failures": 0,
    "_href": "/pulp/api/v2/repositories/ps/importers/puppet_importer/sync_schedules/5058c1cb8a905b059f00006c/"
  }
]
Comment 2 Jason Connor 2012-10-02 21:16:40 EDT
This bug is a side effect of another:
https://bugzilla.redhat.com/show_bug.cgi?id=853196
Comment 3 Jason Connor 2012-10-05 12:39:18 EDT
Merged into master in revision:
57694336ab47fa990d82dfd502038e345a8f81dc
Comment 4 Jeff Ortel 2012-10-05 17:43:08 EDT
build: 0.331
Comment 5 Preethi Thomas 2012-10-10 13:58:12 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 list --repo-id zoo --details
+----------------------------------------------------------------------+
                               Schedules
+----------------------------------------------------------------------+

Schedule:             2014-01-01T00:00:00/P1M
Id:                   507591bcedfc065dee000243
Enabled:              True
Remaining Runs:       N/A
Consecutive Failures: 0
Failure Threshold:    None
First Run:            2014-01-01T05:00:00Z
Last Run:             None
Next Run:             2014-01-01T05:00:00Z

Schedule:             2013-02-01T01:00:00/P1W
Id:                   507591daedfc065dee00024f
Enabled:              True
Remaining Runs:       N/A
Consecutive Failures: 0
Failure Threshold:    None
First Run:            2013-02-01T06:00:00Z
Last Run:             None
Next Run:             2013-02-01T06:00:00Z


[root@pulp-master ~]#
Comment 6 Preethi Thomas 2013-01-09 12:07:47 EST
Pulp v2.0 released

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