Bug 1878670 - [CNV-2.5] virtctl version returns GitVersion:"v0.0.0-master+$Format:%h$"
Summary: [CNV-2.5] virtctl version returns GitVersion:"v0.0.0-master+$Format:%h$"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.5.0
Assignee: Daniel Belenky
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-14 10:23 UTC by Lukas Bednar
Modified: 2020-11-17 13:24 UTC (History)
4 users (show)

Fixed In Version: kubevirt-virtctl-2.5.0-59
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-17 13:24:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to disalbe Go modules at build time (54 bytes, patch)
2020-09-24 07:05 UTC, Daniel Belenky
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:5127 0 None None None 2020-11-17 13:24:41 UTC

Description Lukas Bednar 2020-09-14 10:23:10 UTC
Description of problem:

[cloud-user@ocp-psi-executor ~]$ virtctl version
Client Version: version.Info{GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"$Format:%H$", GitTreeState:"", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"$Format:%H$", GitTreeState:"", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}


Version-Release number of selected component (if applicable):
[cloud-user@ocp-psi-executor ~]$ rpm -qf `which virtctl`
kubevirt-virtctl-2.5.0-49.el8.x86_64
ocp 4.6.0-fc.4
cnv v2.5.0-163


How reproducible: 100


Steps to Reproduce:
1. Install cnv-2.5
2. run virtctl version
3.

Actual results: getting "v0.0.0-master+$Format:%h$"


Expected results: actual version of deployed cnv


Additional info:

Comment 1 Daniel Belenky 2020-09-24 07:05:10 UTC
Created attachment 1716211 [details]
Patch to disalbe Go modules at build time

Comment 2 Daniel Belenky 2020-09-24 07:06:49 UTC
The root of this issue is a change that we did upstream to use Go modules in a vendoring mode.
This caused ldflags to be rendered to the wrong path.

Output of scratch build of my patch:
❯ ./virtctl version                     
Client Version: version.Info{GitVersion:"v0.33.0-rc.0-134-g5723e09", GitCommit:"5723e0941cb7eae56c868f8d4ca50b99f209f6f9", GitTreeState:"clean", BuildDate:"2020-09-24T06:54:39Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
the server could not find the requested resource

Comment 3 Lukas Bednar 2020-10-01 08:29:39 UTC
[cnv-qe-jenkins@kvirt-night46-zlj5h-executor ~]$ rpm -qa kubevirt-virtctl
kubevirt-virtctl-2.5.0-59.el7.x86_64

[cnv-qe-jenkins@kvirt-night46-zlj5h-executor ~]$ virtctl version
Client Version: version.Info{GitVersion:"v0.33.0-rc.0-347-g7551867", GitCommit:"75518673376fd5d62f72d5ff41bc55efa239bd96", GitTreeState:"clean", BuildDate:"2020-09-30T20:14:09Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{GitVersion:"v0.33.0-rc.0-134-g5723e09", GitCommit:"5723e0941cb7eae56c868f8d4ca50b99f209f6f9", GitTreeState:"clean", BuildDate:"2020-09-24T07:14:57Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}

Verified.

Comment 6 errata-xmlrpc 2020-11-17 13:24:22 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 (OpenShift Virtualization 2.5.0 Images), 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-2020:5127


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