Bug 1277070 - It is better to give the accepted time units for "--timeout" option
It is better to give the accepted time units for "--timeout" option
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Juan Vallejo
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-02 04:10 EST by Xingxing Xia
Modified: 2016-09-19 09:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-19 09:55:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xingxing Xia 2015-11-02 04:10:01 EST
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 15:11:26 EDT
Related PR: https://github.com/openshift/origin/pull/9940
Comment 2 Xingxing Xia 2016-07-22 03:10:30 EDT
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.