Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1420280 - "--api-version" option doesn't take effect for "oc config set-cluster"
"--api-version" option doesn't take effect for "oc config set-cluster"
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.5.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Xingxing Xia
: Rebase
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-08 05:53 EST by Yanping Zhang
Modified: 2017-08-16 15 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 01:17:28 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 05:02:50 EDT

  None (edit)
Description Yanping Zhang 2017-02-08 05:53:08 EST
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 10:24:57 EST
Related upstream PR: https://github.com/kubernetes/kubernetes/pull/41139
Comment 2 Juan Vallejo 2017-03-24 18:51:57 EDT
Upstream PR merged. Bug will be fixed in the next rebase.
Comment 3 Fabiano Franz 2017-05-08 16:35:09 EDT
Fixed by the latest Kubernetes rebase.
Comment 5 shahan 2017-06-06 04:39:51 EDT
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 10:43:56 EDT
https://github.com/kubernetes/kubernetes/pull/41139
Comment 7 Fabiano Franz 2017-06-27 18:22:55 EDT
Pull request that deprecates --api-version is in https://github.com/openshift/origin/pull/14919.
Comment 9 XiaochuanWang 2017-07-05 04:20:05 EDT
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 01:17:28 EDT
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.