Bug 1420280 - "--api-version" option doesn't take effect for "oc config set-cluster"
Summary: "--api-version" option doesn't take effect for "oc config set-cluster"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-08 10:53 UTC by Yanping Zhang
Modified: 2017-08-16 19:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-10 05:17:28 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description Yanping Zhang 2017-02-08 10:53:08 UTC
Description of problem:
When run "oc config set-cluster" with option "--api-version", the "--api-version" option doesn't take effect.

Version-Release number of selected component (if applicable):
oc v3.5.0.17+c55cf2b
kubernetes v1.5.2+43a9be4

How reproducible:
Always

Steps to Reproduce:
1. Set cluster with --api-version option:
$ oc config set-cluster cow-cluster --server=http://cow.org:8080 --api-version=v1
Cluster "cow-cluster" set.

2.Check the cluster in config:
$ oc config view


Actual results:
2.The api version is not set in the "cow-cluster" cluster:
$ oc config view
apiVersion: v1
clusters:
- cluster:
    server: http://cow.org:8080
  name: cow-cluster
- cluster:
    api-version: v1
    insecure-skip-tls-verify: true
    server: https://<mycluster>:8443
  name: <mycluster>
<--snip-->


Expected results:
2.Should have "api-version: v1" in cluster "cow-cluster"

Additional info:

Comment 1 Juan Vallejo 2017-02-08 15:24:57 UTC
Related upstream PR: https://github.com/kubernetes/kubernetes/pull/41139

Comment 2 Juan Vallejo 2017-03-24 22:51:57 UTC
Upstream PR merged. Bug will be fixed in the next rebase.

Comment 3 Fabiano Franz 2017-05-08 20:35:09 UTC
Fixed by the latest Kubernetes rebase.

Comment 5 shahan 2017-06-06 08:39:51 UTC
I checked the kubernetes PR 41139 is not rebased into latest Origin master yet (openshift v3.6.95 kubernetes v1.6.1+5115d708d7). So I changed to modified status, after the rebase is done please change back to ON_QA, Thanks!

Comment 6 Juan Vallejo 2017-06-12 14:43:56 UTC
https://github.com/kubernetes/kubernetes/pull/41139

Comment 7 Fabiano Franz 2017-06-27 22:22:55 UTC
Pull request that deprecates --api-version is in https://github.com/openshift/origin/pull/14919.

Comment 9 XiaochuanWang 2017-07-05 08:20:05 UTC
From PR https://github.com/openshift/origin/pull/14919, "--api-version" in oc config set-cluster is deprecated.

Tested on oc v3.6.133
kubernetes v1.6.1+5115d708d7
It works as PR design now:

# oc config view
apiVersion: v1
clusters:
- cluster:
    server: http://cow.org:8080
  name: cow-cluster
- cluster:
    insecure-skip-tls-verify: true
    server: https://xxx.com:8443
  name: xxx-com:8443
<--snip-->

This could be Verified.

Comment 11 errata-xmlrpc 2017-08-10 05:17:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1716


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