Bug 1763728 - oc adm release extract --tools, --command broken if using extracted oc
Summary: oc adm release extract --tools, --command broken if using extracted oc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.3.0
Assignee: Sally
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-21 12:57 UTC by Sally
Modified: 2020-01-23 11:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-23 11:08:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 131 0 'None' closed Bug 1763728: fix 'oc adm release extract' version injection 2020-04-30 00:27:54 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:08:56 UTC

Description Sally 2019-10-21 12:57:05 UTC
This change https://github.com/openshift/oc/pull/88 introduced a bug in oc where an extracted oc cannot inject the correct version into binaries via binaryReplacement.

To reproduce:

1. extract oc via 'oc adm release extract --command oc <release>'  
2. use extracted oc to 'oc adm release extract --tools|--command <release>'

Comment 2 zhou ying 2019-10-25 07:17:04 UTC
Confirmed with latest version ,the issue has fixed:
[root@192 ~]# ./oc version -o yaml 
clientVersion:
  buildDate: "2019-10-24T14:51:27Z"
  compiler: gc
  gitCommit: 118066a57f6280d685153dc0253ca2eb1fdc2333
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910240917
  goVersion: go1.12.8
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.3.0-0.nightly-2019-10-25-015726

[root@192 ~]# ./oc adm release extract --command oc --to='/home/' registry.svc.ci.openshift.org/ocp/release:4.3.0-0.nightly-2019-10-24-203507


[root@192 ~]# cd /home/

[root@192 home]# ./oc version -o yaml
clientVersion:
  buildDate: "2019-10-24T14:51:27Z"
  compiler: gc
  gitCommit: 118066a57f6280d685153dc0253ca2eb1fdc2333
  gitTreeState: clean
  gitVersion: openshift-clients-4.3.0-201910240917
  goVersion: go1.12.8
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.3.0-0.nightly-2019-10-25-015726
releaseClientVersion: 4.3.0-0.nightly-2019-10-24-203507

Comment 4 errata-xmlrpc 2020-01-23 11:08:26 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:0062


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