Bug 709500 - Error when scheduling package install with --when parameter
Summary: Error when scheduling package install with --when parameter
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 26
Assignee: James Slagle
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: pulp-verified
TreeView+ depends on / blocked
 
Reported: 2011-05-31 20:17 UTC by Preethi Thomas
Modified: 2011-08-16 13:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 13:59:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-05-31 20:17:08 UTC
Description of problem:


[root@preethi ~]# pulp-admin package install -n emoticons --consumerid pulp-client --when="2010-06-01 01:01" 
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 176, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/cli/base.py", line 137, in main
    command.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 118, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 206, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/core/package.py", line 112, in run
    when = parse_at_schedule(self.opts.when)
  File "/usr/lib/python2.7/site-packages/pulp/client/core/utils.py", line 92, in parse_at_schedule
    dateutils.parse_iso8601_datetime(start)
  File "/usr/lib/python2.7/site-packages/pulp/common/dateutils.py", line 126, in parse_iso8601_datetime
    return isodate.parse_datetime(datetime_str)
  File "/usr/lib/python2.7/site-packages/isodate/isodatetime.py", line 48, in parse_datetime
    datestring, timestring = datetimestring.split('T')
ValueError: need more than 1 value to unpack



[root@preethi ~]# pulp-admin package install -n emoticons --consumerid pulp-client --when=2011-05-31T20:30:00-05:00:00
Created task id: cf6c1ebd-8bc4-11e0-bf75-002564a85a58
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 176, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/cli/base.py", line 137, in main
    command.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 118, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 206, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/core/package.py", line 125, in run
    time.strftime("%Y-%m-%d %H:%M", time.localtime(when))
TypeError: a float is required
[root@preethi ~]#

Comment 1 James Slagle 2011-06-17 21:09:18 UTC
committed fix for this in 4041a00a74e4057cf264b81c0c6270f5639a5def

There were 2 issues here, one was that the help documentation was wrong, the 2nd was a bug in the date formatting in the command output.  Those should be fixed.

Comment 2 Jeff Ortel 2011-06-17 21:10:09 UTC
build: 0.192

Comment 3 James Slagle 2011-06-20 19:27:04 UTC
This bug was not included in build 0.192

Comment 4 Jeff Ortel 2011-06-22 21:12:22 UTC
build: 0.196

Comment 5 Preethi Thomas 2011-07-06 11:53:14 UTC
fails_qa

[root@preethi ~]# rpm -q pulp
pulp-0.0.200-1.fc14.noarch

failing since the package install is being scheduled for a future time, the cursor should return. Currently the cursor waits for the package install to occur.

[root@preethi ~]# pulp-admin package install -n zsh --consumerid  pulp-client1 --when="2011-07-06T09:30:00-05:00:00"
Created task id: 3e7ab76e-a7c7-11e0-a727-002564a85a58
Task is scheduled for: 2011-07-06T09:30:00-05:00:00
Waiting: [\]

Comment 6 James Slagle 2011-07-13 22:17:52 UTC
I added a --wait option to the package install command.  If specified, the command will wait until the install is complete to exit.  Otherwise, it will exit once the task has been scheduled.

If --wait is specified, and the consumer is unavailable, we confirm with the user if they still want to wait since it could be an indeterminate amount of time since we're not sure if we can reach the consumer.  This matches the existing behavior.

committed to pulp master: 634f6695bb0a6c9324a3d97b54e7b533b5ab86eb

Comment 7 Jeff Ortel 2011-07-14 20:33:00 UTC
Build 0.207.

Comment 8 James Slagle 2011-07-15 19:22:25 UTC
After further discussion, it makes sense to restore the previous
behavior and instead change the option to be --nowait.  So, if you want to kick off a package install that is far into the future, you will need to specify --nowait on the command line if you want the command to return as soon as the package install is scheduled.

committed to pulp master: 8c54707fc4deae65fb11f40746cbad1d3d6b79fc

Comment 9 Jeff Ortel 2011-07-15 21:30:24 UTC
build: 0.210

Comment 10 Preethi Thomas 2011-07-27 20:17:15 UTC
verified

[root@preethi upload]# rpm -q pulp
pulp-0.0.213-1.fc14.noarch


[root@preethi upload]# pulp-admin package install -n screen --consumerid pulp-client --when="2011-07-28T09:30:00-05:00:00" --nowait
Created task id: e50b311c-b88e-11e0-a105-002564a85a58
Task is scheduled for: 2011-07-28T09:30:00-05:00:00

Comment 11 Preethi Thomas 2011-08-16 13:59:09 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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