Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1791523

Summary: CLI tools downloaded from mirror.openshift.com don't have the correct version numbers from 4.2 onwards
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, ccallega, ccoleman, jokerman, lmeyer, maszulik, mfojtik, pkanthal, pruan, wking, wsun, yinzhou
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1780779 Environment:
Last Closed: 2020-05-04 11:24:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1780779    

Comment 2 W. Trevor King 2020-01-16 05:08:25 UTC
Adjusting the blocker, because this 4.4-targeting bug should block the 4.2-targeting bug 1780779.  Maybe eventually we'll have a 4.3 bug in the middle?  I guess we'll see.

Comment 3 W. Trevor King 2020-01-16 05:16:41 UTC
Trying to reproduce from [1]:

$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.4.0-0.nightly-2020-01-14-004804/openshift-client-linux-4.4.0-0.nightly-2020-01-14-004804.tar.gz | tar -xzf - oc
$ ./oc version --client -o yaml
clientVersion:
  buildDate: "2020-01-11T20:11:49Z"
  compiler: gc
  gitCommit: 8ba68e892a4df22571464234c5a2f7e1c75a3a9a
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910250623-158-g8ba68e89
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
$ mv oc ocx
$ ./ocx adm release extract --command=oc $(curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.4.0-0.nightly-2020-01-14-004804/release.txt | sed -n 's/Pull From: //p')
$ ./oc version --client -o yaml
clientVersion:
  buildDate: "2020-01-11T20:11:49Z"
  compiler: gc
  gitCommit: 8ba68e892a4df22571464234c5a2f7e1c75a3a9a
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910250623-158-g8ba68e89
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.4.0-0.nightly-2020-01-14-004804

So I dunno about getting major/minor filled in, but we need a more modern oc (4.3 or later, bug 1790537 and bug 1773257) performing the extraction to populate mirrors if we want to get releaseClientVersion filled in.

[1]: https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.4.0-0.nightly-2020-01-14-004804/

Comment 4 Maciej Szulik 2020-01-17 14:56:49 UTC
This should be fixed with https://github.com/openshift/oc/pull/250

Comment 6 zhou ying 2020-01-19 01:47:20 UTC
confirmed with oc extracted from https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.4.0-0.nightly-2020-01-14-004804/release.txt, version info shows correctly:

oc adm release extract --command=oc $(curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/4.4.0-0.nightly-2020-01-14-004804/release.txt | sed -n 's/Pull From: //p')


[root@localhost yinzhou]# ./oc version -o yaml 
clientVersion:
  buildDate: "2020-01-11T20:11:49Z"
  compiler: gc
  gitCommit: 8ba68e892a4df22571464234c5a2f7e1c75a3a9a
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910250623-158-g8ba68e89
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.4.0-0.nightly-2020-01-14-004804

Comment 8 errata-xmlrpc 2020-05-04 11:24:47 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/RHBA-2020:0581