openshift-evangelists / oc-cluster-wrapper

oc cluster up bash wrapper
Apache License 2.0
144 stars 72 forks source link

remove invalid --request-timeout option #68

Closed mmckinst closed 7 years ago

mmckinst commented 7 years ago

The oc version --request-timeout=1 command is invalid with oc v1.3.1. See below for the error:

[9:15][mmckinst@mmckinst oc-cluster-wrapper] oc version --request-timeout=1 
Error: unknown flag: --request-timeout

Usage:
  oc version [options]
Use "oc options" for a list of global command-line options (applies to all commands).

[9:15][mmckinst@mmckinst oc-cluster-wrapper] 

And my specific version infor if necessary is:

[9:15][mmckinst@mmckinst oc-cluster-wrapper] oc version
oc v1.3.1
kubernetes v1.3.0+52492b4
features: Basic-Auth GSSAPI Kerberos SPNEGO
[9:15][mmckinst@mmckinst oc-cluster-wrapper] 
[9:19][mmckinst@mmckinst oc-cluster-wrapper] rpm -q origin-clients                    
origin-clients-1.3.1-1.fc25.x86_64
[9:19][mmckinst@mmckinst oc-cluster-wrapper] 
TomSweeneyRedHat commented 7 years ago

LGTM

jorgemoralespou commented 7 years ago

@mmckinst I would recommend you to upgrade the oc client if you can, although you can still run "1.3.1" version of the images. I would rather not remove the flag, as from 1.4.0 onwards it is supported. If you can not upgrade the client, I will make a "supports" condition to avoid you the problem.

jorgemoralespou commented 7 years ago

I have added an if to solve your use case. Should now work.

mmckinst commented 7 years ago

Thanks! I like the conditional that was added, the best of both worlds: d8438b6968a937186731c7546d7f09c9c599ffc7