Bug 1277070

Summary: It is better to give the accepted time units for "--timeout" option
Product: OKD Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: low    
Version: 3.xCC: aos-bugs, jvallejo, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-19 13:55:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xingxing Xia 2015-11-02 09:10:01 UTC
Description of problem:
"oc scale" has "--timeout" option, but the help info does not give accepted time units. 


Version-Release number of selected component (if applicable):
oc v1.0.7-109-g3cf7f3c
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always

Steps to Reproduce:
1. $ oc scale rc database-1 --replicas=3 --timeout=10
2. $ oc scale rc database-1 --replicas=3 --timeout=10m


Actual results:
During testing, 10, 10min were guessed and tried, but they gave error: invalid argument "10min" for --timeout=10min: time: unknown unit min in duration 10min.

Then the working 10m, 10s, 10h were found. This "guess and try" process is not friendly.

Besides, the help info gives default value 0 without unit, this misleads us to think we just need give the numbered time only.


Expected results:
It is better to give the accepted time units for "--timeout" option

Additional info:
"oc replace" has "--timeout" option too.

Comment 1 Juan Vallejo 2016-07-19 19:11:26 UTC
Related PR: https://github.com/openshift/origin/pull/9940

Comment 2 Xingxing Xia 2016-07-22 07:10:30 UTC
Tested with:
$ oc version
oc v1.3.0-alpha.2+bc63174
kubernetes v1.3.0+57fb9ac
features: Basic-Auth GSSAPI Kerberos SPNEGO

Now oc scale/replace -h tells time unit for --timeout:
      --timeout=0: ... zero means determine a timeout from the size of the object. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h)