Bug 1309874 - if specifying --config in oc new-app --search with an invalid option, the order of where to put the --config option makes a difference to the returned output
Summary: if specifying --config in oc new-app --search with an invalid option, the ord...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 21:07 UTC by Peter Ruan
Modified: 2016-02-19 17:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-19 17:42:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Peter Ruan 2016-02-18 21:07:00 UTC
Description of problem:
if specifying --config in oc new-app --search with an invalid option, the order of where to put the --config option makes a difference to the returned output Looks like the order where I put --config matters in this case.

*** put --config at the end of cmd line
oc new-app --search --docker-image --config=/home/pruan/workdir/dhcp-16-164-pruan/ose_pruan1.kubeconfig                                           [ruby-2.2.3]
error: No configuration file found, please login or point to an existing file:

  1. Via the command-line flag --config
  2. Via the KUBECONFIG environment variable
  3. In your home directory as ~/.kube/config

To view or setup config directly use the 'config' command.

*** put --config at the middle of the cmd line
$ oc new-app --config=/home/pruan/workdir/dhcp-16-164-pruan/ose_pruan1.kubeconfig --search --docker-image                       

                   
Error: flag needs an argument: --docker-image




Version-Release number of selected component (if applicable):
oc v1.1.3-40-g678463c
kubernetes v1.2.0-alpha.7-703-gbc4550d


How reproducible:
always.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ben Parees 2016-02-18 22:19:23 UTC
This is working correctly.  --docker-image needs an additional argument.  Since you aren't specifying an actual image, the --config=foo is being treated as that additional argument.  Since --config=foo was consumed as the argument to --docker-image, you are not supplying a --config argument, so you get an error that there is no configuration.

Comment 2 Ben Parees 2016-02-18 22:20:32 UTC
(and of course in the second case you're correctly being told that you need to specify an additional argument to --docker-image)


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