Bug 669422

Summary: Repo sync --timeout doesn't validate input
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: user-experienceAssignee: Sayli Karmarkar <skarmark>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: 1.0.0CC: cperry, jconnor, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 29   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-24 20:11:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 673053    

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.