Bug 669759
Summary: | Package installations can be scheduled for the past | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Jay Dobies <jason.dobies> |
Component: | z_other | Assignee: | John Matthews <jmatthew> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | jconnor, jmatthew, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | Sprint 21 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 12:09:42 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 647488, 673053 |
Description
Jay Dobies
2011-01-14 16:25:50 UTC
Below is an example of what happens now if you schedule for a past time. The change was done client side. $ date Wed Mar 9 10:10:43 EST 2011 $ sudo pulp-admin package install -n zsh --when "2011-03-09 10:00" --consumerid test_consumer Scheduled time is in the past: 2011-03-09 10:00. Please re-run with a valid time. If someone uses the API directly and schedules for a past time, the schedule time is essentially ignored and the the action will be executed as soon as possible. Commit: http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=cfa4c1e18638617eb1e743143f90454e10cf2b75 Build: 0.151 Build: 0.151 fails_qa There is a typo in the message missing "is" in "scheduled time in the past" [root@preethi ~]# pulp-admin package install -n zsh --consumerid pulp-client1 --when="2011-07-05T09:30:00-05:00:00" error: operation failed: ValueError: AtScheduler: scheduled time in the past: 2011-07-05 14:30:00+00:00 http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=aae12f715c835faff71776d744f48576fa0b93ad diff --git a/src/pulp/server/tasking/scheduler.py b/src/pulp/server/tasking/scheduler.py index b458044..bbbb765 100644 --- a/src/pulp/server/tasking/scheduler.py +++ b/src/pulp/server/tasking/scheduler.py @@ -82,7 +82,7 @@ class AtScheduler(Scheduler): """ assert isinstance(scheduled_time, datetime.datetime) if scheduled_time < datetime.datetime.now(dateutils.local_tz()): - raise ValueError('AtScheduler: scheduled time in the past: %s' % + raise ValueError('AtScheduler: scheduled time is in the past: %s' % str(scheduled_time)) self.scheduled_time = dateutils.to_utc_datetime(scheduled_time) $ sudo pulp-admin package install --consumerid test --when 2010-10-10T12:00 -n zsh error: operation failed: ValueError: AtScheduler: scheduled time is in the past: 2010-10-10 16:00:00+00:00 Fixed in 0.202 verified [root@preethi ~]# rpm -q pulp pulp-0.0.213-1.fc14.noarch [root@preethi ~]# pulp-admin package install --consumerid=pulp-client -n zsh --when="2011-07-05T09:30:00-05:00:00" error: operation failed: ValueError: AtScheduler: scheduled time is in the past: 2011-07-05 14:30:00+00:00 Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |