Description of problem: kubevirt doesn't report its git commit or version Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: kubectl proxy >/dev/null & curl -sS http://127.0.0.1:8001/apis/subresources.kubevirt.io { "kind": "APIGroup", "apiVersion": "v1", "name": "subresources.kubevirt.io", "versions": [ { "groupVersion": "subresources.kubevirt.io/v1alpha3", "version": "v1alpha3" } ], "preferredVersion": { "groupVersion": "subresources.kubevirt.io/v1alpha3", "version": "v1alpha3" } } we take the version v1alpha3 and then: curl -sS http://127.0.0.1:8001/apis/subresources.kubevirt.io/v1alpha3/version { "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" } fg ctrl-c Expected results: { "gitVersion": "v0.26.1", "gitCommit": "e40ff7965e2aadbf21131626dfa3be85524e3a2c", "gitTreeState": "clean", "buildDate": "2020-03-31T16:26:36Z", "goVersion": "go1.12.12", "compiler": "gc", "platform": "linux/amd64" } Additional info:
(In reply to Tareq Alayan from comment #0) > Description of problem: > kubevirt doesn't report its git commit or version > > Version-Release number of selected component (if applicable): HCO image: registry-proxy.engineering.redhat.com/rh-osbs/container-native-virtualization-hyperconverged-cluster-operator@sha256:79b15a603fe6527df83dd53033410bedc54bb19c22f7853f770fbbf62008f024 CSV creation time: 2020-05-06 21:08:08 > > > How reproducible: > always > > Steps to Reproduce: > kubectl proxy >/dev/null & > curl -sS http://127.0.0.1:8001/apis/subresources.kubevirt.io > { > "kind": "APIGroup", > "apiVersion": "v1", > "name": "subresources.kubevirt.io", > "versions": [ > { > "groupVersion": "subresources.kubevirt.io/v1alpha3", > "version": "v1alpha3" > } > ], > "preferredVersion": { > "groupVersion": "subresources.kubevirt.io/v1alpha3", > "version": "v1alpha3" > } > } > > we take the version v1alpha3 > and then: > curl -sS http://127.0.0.1:8001/apis/subresources.kubevirt.io/v1alpha3/version > { > "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" > } > fg > ctrl-c > > > Expected results: > > { > "gitVersion": "v0.26.1", > "gitCommit": "e40ff7965e2aadbf21131626dfa3be85524e3a2c", > "gitTreeState": "clean", > "buildDate": "2020-03-31T16:26:36Z", > "goVersion": "go1.12.12", > "compiler": "gc", > "platform": "linux/amd64" > } > > > > Additional info:
The root cause for this bug is that we are now using Go 1.13 and it uses go modules to for to compile the sources unless we explicitly set GO111MODULE to 'off'. A fix that disables GO111MODULE: https://code.engineering.redhat.com/gerrit/#/c/201060/1 Currently there is an outage in Brew so we can't get new builds.
Created attachment 1690641 [details] disable GO111MODULE during the build
Verified that with a scratch build we get the values as expected: [root@7b05b5f26f48 /]# virtctl version Client Version: version.Info{GitVersion:"v0.29.1", GitCommit:"3452204c267b9c29492e2afc3c18761ee42a17e6", GitTreeState:"clean", BuildDate:"2020-05-21T13:20:50Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"} I merged the patch, let's wait for official build and verification from QE. Moving the bug to MODIFIED.
verify with build: $ virtctl version Client Version: version.Info{GitVersion:"v0.26.1", GitCommit:"e40ff7965e2aadbf21131626dfa3be85524e3a2c", GitTreeState:"clean", BuildDate:"2020-02-19T16:13:09Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{GitVersion:"v0.30.0", GitCommit:"736b4aec6b2e92f2ab09ccfa6c5eb79366e88e5a", GitTreeState:"clean", BuildDate:"2020-06-08T21:28:27Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"} sh-4.2# kubectl proxy >/dev/null & curl -sS http://127.0.0.1:8001/apis/subresources.kubevirt.io [2] 2066654 { "kind": "APIGroup", "apiVersion": "v1", "name": "subresources.kubevirt.io", "versions": [ { "groupVersion": "subresources.kubevirt.io/v1alpha3", "version": "v1alpha3" } ], "preferredVersion": { "groupVersion": "subresources.kubevirt.io/v1alpha3", "version": "v1alpha3" } } sh-4.2# curl -sS http://127.0.0.1:8001/apis/subresources.kubevirt.io/v1alpha3/version { "gitVersion": "v0.30.0", "gitCommit": "736b4aec6b2e92f2ab09ccfa6c5eb79366e88e5a", "gitTreeState": "clean", "buildDate": "2020-06-08T21:28:27Z", "goVersion": "go1.13.4", "compiler": "gc", "platform": "linux/amd64" } move to verified.
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/RHSA-2020:3194