Bug 1277070 - It is better to give the accepted time units for "--timeout" option
Summary: It is better to give the accepted time units for "--timeout" option
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Juan Vallejo
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-02 09:10 UTC by Xingxing Xia
Modified: 2016-09-19 13:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 13:55:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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)


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