Bug 1820258

Summary: kube-apiserver can be deployed without cert-syncer having valid token
Product: OpenShift Container Platform Reporter: Tomáš Nožička <tnozicka>
Component: kube-apiserverAssignee: Tomáš Nožička <tnozicka>
Status: CLOSED ERRATA QA Contact: Ke Wang <kewang>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.4CC: aos-bugs, kewang, mfojtik, sanchezl, xxia
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: 1820255 Environment:
Last Closed: 2020-05-04 11:48:02 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: 1820255    
Bug Blocks:    

Description Tomáš Nožička 2020-04-02 15:39:54 UTC
+++ This bug was initially created as a clone of Bug #1820255 +++

kube-apiserver can be deployed without cert-syncer having a valid token. This ca be caused by a race when making revisions from token Secret as in https://bugzilla.redhat.com/show_bug.cgi?id=1819256

Comment 3 Ke Wang 2020-04-20 08:00:42 UTC
Verified with OCP build 4.4.0-0.nightly-2020-04-18-095545,
Verification steps:
1. In first terminal, Run this command in a loop to make sure that data.token is deleted from openshift-kube-controller-manager/localhost-recovery-client-token
# for i in {1..100} ; do oc patch secret -n openshift-kube-controller-manager localhost-recovery-client-token --type='json' -p='[{"op": "replace", "path": "/data/token", "value": ""}]'; done

2. In another terminal,  Force operator to retry rolling out by:
$ oc patch kubeapiserver/cluster --type=json -p '[ {"op": "replace", "path": "/spec/forceRedeploymentReason", "value": "forced test 1" } ]' 

$ oc get pods -n openshift-kube-apiserver
 ...
kube-apiserver-osp41-7g9pl-master-1      0/4     Init:0/1    0          2s
 ...
 
kube-apiserver can be deployed even though data.token is deleted from openshift-kube-controller-manager/localhost-recovery-client-token.

Comment 5 errata-xmlrpc 2020-05-04 11:48:02 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

Comment 6 Luis Sanchez 2020-05-12 13:47:45 UTC
*** Bug 1807881 has been marked as a duplicate of this bug. ***