Bug 669422 - Repo sync --timeout doesn't validate input
Summary: Repo sync --timeout doesn't validate input
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: Sprint 29
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 673053
TreeView+ depends on / blocked
 
Reported: 2011-01-13 16:36 UTC by Jay Dobies
Modified: 2015-03-23 01:10 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Jay Dobies 2011-01-13 16:36:51 UTC
We need to ensure that the user doesn't accidentally enter a bad timeout.

$ pulp-admin repo sync --id pulp-f14-64 --timeout foo
Sync for repository pulp-f14-64 started
Use "repo status" to check on the progress

Comment 1 Sayli Karmarkar 2011-03-23 05:34:32 UTC
Fixed.

$ sudo pulp-admin repo sync --id=mytest1 --timeout=foo -F
error: operation failed: PulpException: 'Invalid timeout value: foo, see --help'

Comment 2 Jeff Ortel 2011-03-29 17:32:36 UTC
Build: 0.158

Comment 3 Preethi Thomas 2011-07-06 17:01:41 UTC
fails_qa
looks like this has changed with the isodate implementation

[root@preethi ~]# rpm -q pulp
pulp-0.0.200-1.fc14.noarch
[root@preethi ~]# 
[root@preethi ~]#  sudo pulp-admin repo sync --id=test --timeout=foo -F
Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 194, in <module>
    admin.main()
  File "/usr/lib/python2.7/site-packages/pulp/client/cli/base.py", line 117, in main
    command.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 116, in main
    action.main(args[1:])
  File "/usr/lib/python2.7/site-packages/pulp/client/core/base.py", line 204, in main
    self.run()
  File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 854, in run
    task = self.get_task()
  File "/usr/lib/python2.7/site-packages/pulp/client/core/repo.py", line 845, in get_task
    parse_iso8601_duration(timeout)
  File "/usr/lib/python2.7/site-packages/pulp/common/dateutils.py", line 173, in parse_iso8601_duration
    return isodate.parse_duration(duration_str)
  File "/usr/lib/python2.7/site-packages/isodate/isoduration.py", line 99, in parse_duration
    raise ISO8601Error("Unable to parse duration string %r" % datestring)
isodate.isoerror.ISO8601Error: Unable to parse duration string 'foo'
[root@preethi ~]#

Comment 4 Sayli Karmarkar 2011-10-17 06:28:10 UTC
commit 39de2088dd41e957241182dfb47351bec72eda1a
Author: Sayli Karmarkar <skarmark>
Date:   Sun Oct 16 23:24:47 2011 -0700

    669422 - Fixed repo sync not validating timeout input after recent isodate changes. Also added validation for repo clone timeout and fixed a typo

Comment 5 Jeff Ortel 2011-10-20 00:35:03 UTC
build: 0.240

Comment 6 Preethi Thomas 2011-10-26 19:51:53 UTC
verified

[root@preethi ~]# rpm -q pulp
pulp-0.0.241-1.fc15.noarch
[root@preethi ~]# 

[root@preethi ~]# pulp-admin repo sync --id=f14 --timeout=foo -F
Improperly formatted timeout: foo , see --help


[root@preethi ~]# pulp-admin repo clone --id=f14 --clone_id=f14-clone --timeout=foo 
Improperly formatted timeout: foo , see --help
[root@preethi ~]#

Comment 7 Preethi Thomas 2012-02-24 20:11:33 UTC
Pulp v1.0 is released
Closed Current Release.


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