Bug 705410 - Error handling with repo scheduling
Summary: Error handling with repo scheduling
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: Sprint 29
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-17 15:42 UTC by Preethi Thomas
Modified: 2014-03-31 01:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:14:53 UTC


Attachments (Terms of Use)

Description Preethi Thomas 2011-05-17 15:42:15 UTC
Description of problem:

Needs to have a better error handling when a wrong value is entered for repo scheduling options


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


How reproducible:


Steps to Reproduce:

[root@preethi ~]# pulp-admin repo update --id=repos-pulp-pulp-testing-fedora-14-i386 --interval P1H
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 175, 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/repo.py", line 695, in run
    v = parse_interval_schedule(v, self.opts.schedule_start, self.opts.schedule_runs)
  File "/usr/lib/python2.7/site-packages/pulp/client/core/utils.py", line 71, in parse_interval_schedule
    interval = dateutils.parse_iso8601_duration(interval)
  File "/usr/lib/python2.7/site-packages/pulp/common/dateutils.py", line 136, in parse_iso8601_duration
    return isodate.parse_duration(duration_str)
  File "/usr/lib/python2.7/site-packages/isodate/isoduration.py", line 86, in parse_duration
    durdt = parse_datetime(datestring[1:])
  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



Actual results:


Expected results:


Additional info:

Comment 1 Jason Connor 2011-10-11 05:01:17 UTC
Converted parsing error from ValueError to ISO8601Error, which the cli handles

Comment 2 Jeff Ortel 2011-10-13 00:49:27 UTC
build: 0.238

Comment 3 Preethi Thomas 2011-10-26 19:48:18 UTC
root@preethi ~]# rpm -q pulp
pulp-0.0.241-1.fc15.noarch


[root@preethi ~]#  pulp-admin repo update --id=f14 --interval P1H
Malformed ISO8601 duration string: P1H
[root@preethi ~]#  pulp-admin repo update --id=f14 --interval=P1M
error: operation failed: PulpException: Improperly formatted schedule: P1.0M

Comment 4 Preethi Thomas 2012-02-24 20:14:53 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 5 Preethi Thomas 2012-02-24 20:19:45 UTC
Pulp v1.0 is released.


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