Bug 1911211 - Should show the cert-recovery-controller version correctly
Summary: Should show the cert-recovery-controller version correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-controller-manager
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Jan Chaloupka
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks: 1917980
TreeView+ depends on / blocked
 
Reported: 2020-12-28 07:40 UTC by zhou ying
Modified: 2021-07-27 22:36 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 22:35:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift build-machinery-go pull 30 0 None open bug 1911211: Prefer OS_GIT_VERSION over SOURCE_GIT_TAG when getting build version 2021-02-08 06:07:15 UTC
Github openshift cluster-kube-controller-manager-operator pull 497 0 None closed Bug 1911211: Fix version reporting for recovery-controller 2021-02-09 11:40:41 UTC
Github openshift cluster-kube-controller-manager-operator pull 505 0 None open Bug 1911211: Update build-machinery-go to the latest master HEAD 2021-02-09 13:04:40 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:36:04 UTC

Description zhou ying 2020-12-28 07:40:37 UTC
Description of problem:
When use `oc logs po/kube-controller-manager-xxx -c kube-controller-manager-recovery-controller` show the cert-recovery-controller version v0.0.0-master+$Format:%h$-$Format:%H$

Version-Release number of selected component (if applicable):
[root@dhcp-140-138 cli]#  oc version 
Client Version: 4.7.0-202012220147.p0-8fbc95f
Server Version: 4.7.0-0.nightly-2020-12-21-131655
Kubernetes Version: v1.20.0+87544c5

How reproducible:
Always

Steps to Reproduce:
1) When use command to check the kube-controller-manager-recovery-controller logs:
`oc logs po/kube-controller-manager-xxx -c kube-controller-manager-recovery-controller` 

Actual results:
1) Show the version info is incorrect.
[root@dhcp-140-138 cli]# oc logs po/kube-controller-manager-ip-10-0-142-254.us-east-2.compute.internal -c kube-controller-manager-recovery-controller 
....
I1228 01:41:16.870909       1 builder.go:238] cert-recovery-controller version v0.0.0-master+$Format:%h$-$Format:%H$
....
Expected results:
3) Show the kube-controller-manager-recovery-controller version correctly.

Additional info:

Comment 1 Maciej Szulik 2021-01-05 11:08:54 UTC
These numbers are not injected properly in our CI builds. This is only happening during normal build process performed by ART.

Comment 2 zhou ying 2021-01-06 12:11:05 UTC
I checked with the 4.6 GA version , also could hit the same error , so will re-open this to Release team. 

[root@dhcp-140-138 roottest]# oc get clusterversion 
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.9     True        False         74m     Cluster version is 4.6.9

[root@dhcp-140-138 roottest]# oc logs -f po/kube-controller-manager-ip-xxxxx.compute.internal -c kube-controller-manager-recovery-controller
+ timeout 3m /bin/bash -exuo pipefail -c 'while [ -n "$(ss -Htanop \( sport = 9443 \))" ]; do sleep 1; done'
++ ss -Htanop '(' sport = 9443 ')'
+ '[' -n '' ']'
+ exec cluster-kube-controller-manager-operator cert-recovery-controller --kubeconfig=/etc/kubernetes/static-pod-resources/configmaps/kube-controller-cert-syncer-kubeconfig/kubeconfig --namespace=openshift-kube-controller-manager --listen=0.0.0.0:9443 -v=2
W0106 10:41:36.418992       1 cmd.go:204] Using insecure, self-signed certificates
I0106 10:41:36.419202       1 crypto.go:601] Generating new CA for cert-recovery-controller-signer@1609929696 cert, and key in /tmp/serving-cert-535215117/serving-signer.crt, /tmp/serving-cert-535215117/serving-signer.key
I0106 10:41:36.992105       1 observer_polling.go:159] Starting file observer
I0106 10:41:37.039978       1 builder.go:238] cert-recovery-controller version v0.0.0-master+$Format:%h$-$Format:%H$

Comment 5 zhou ying 2021-01-22 05:58:09 UTC
Checked with latest payload :

[root@dhcp-140-138 ~]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-01-21-215614   True        False         14m     Cluster version is 4.7.0-0.nightly-2021-01-21-215614

[root@dhcp-140-138 ~]# oc logs -f po/kube-controller-manager-ip-10-0-137-3.us-east-2.compute.internal -c kube-controller-manager-recovery-controller
....
I0122 05:28:55.250127       1 builder.go:238] cert-recovery-controller version v0.0.0-alpha.0-891-gb2a87786-b2a877865f9b4dc7bb7cf30f6cc9f072f64fd205

Comment 11 Maciej Szulik 2021-02-02 17:16:14 UTC
Jan we probably should update the env vars being set in Makefile. Theoretically these should be the same which we set for the operator version.

Comment 13 zhou ying 2021-02-10 03:07:09 UTC
the issue has fixed with latest 4.8 payload: 
[root@dhcp-140-138 roottest]# oc get clusterversion 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-02-09-221546   True        False         40m     Cluster version is 4.8.0-0.nightly-2021-02-09-221546


[root@dhcp-140-138 roottest]# oc logs -f po/kube-controller-manager-ip-10-0-149-168.us-east-2.compute.internal  -c kube-controller-manager-recovery-controller
+ timeout 3m /bin/bash -exuo pipefail -c 'while [ -n "$(ss -Htanop \( sport = 9443 \))" ]; do sleep 1; done'
++ ss -Htanop '(' sport = 9443 ')'
+ '[' -n '' ']'
+ exec cluster-kube-controller-manager-operator cert-recovery-controller --kubeconfig=/etc/kubernetes/static-pod-resources/configmaps/kube-controller-cert-syncer-kubeconfig/kubeconfig --namespace=openshift-kube-controller-manager --listen=0.0.0.0:9443 -v=2
W0210 02:12:13.828375       1 cmd.go:204] Using insecure, self-signed certificates
I0210 02:12:13.828585       1 crypto.go:601] Generating new CA for cert-recovery-controller-signer@1612923133 cert, and key in /tmp/serving-cert-963210161/serving-signer.crt, /tmp/serving-cert-963210161/serving-signer.key
I0210 02:12:14.202980       1 observer_polling.go:159] Starting file observer
I0210 02:12:14.225806       1 builder.go:238] cert-recovery-controller version 4.8.0-202102091857.p0-cb87168-cb87168b232951b8b8ead7e75e857fdc92c33597
...

Comment 16 errata-xmlrpc 2021-07-27 22:35:38 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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-2021:2438


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