We should verify the input to make sure that the package installation scheduled time actually makes sense. The following example was run on 2011-01-14 using a package install date of a year previous. $ pulp-admin package install -n emoticons --consumerid client1 --when="2010-01-01 01:01" Created task id: d525526e-1ffa-11e0-9b23-5254003d10ee Task is scheduled for: 2010-01-01 01:01 . Package install failed
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
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.