Bug 1985308

Summary: Creating a configmap for a CA without a trailing newline in source file results in non-working CA verification
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: NetworkingAssignee: Surya Seetharaman <surya>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: low CC: aconstan, ddelcian, lmohanty, mallmen, operations, surya, tas, wking
Version: 4.6.z   
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-21 08:02:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1961811    
Bug Blocks:    

Comment 1 Surya Seetharaman 2021-08-09 07:08:32 UTC
The cherry-pick did not get picked up. So this will take more time.

Comment 4 zhaozhanqi 2021-09-14 06:17:21 UTC
Verified this bug on 4.8.0-0.nightly-2021-09-13-115830 1. Tested with the following file 

$cat ca.crt 
-----BEGIN CERTIFICATE-----
xxxxxxx
-----END CERTIFICATE-----[zzhao$

2. oc create configmap custom-ca49 --from-file=ca-bundle.crt=/home/zzhao/bug_1961811/ca.crt -n openshift-config

3. oc patch proxy/cluster      --type=merge      --patch='{"spec":{"trustedCA":{"name":"custom-ca49"}}}'

4. oc get cm -n openshift-config-managed trusted-ca-bundle -o yaml > trusted-ca

5. $ cat trusted-ca | grep yo= -A 3
    Mn9OTfIwCuXDuvQwp5s7vZ56mpqJYKJ9lyo=
    -----END CERTIFICATE-----
    # ACCVRAIZ1
    -----BEGIN CERTIFICATE-----

Comment 6 errata-xmlrpc 2021-09-21 08:02:00 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 Container Platform 4.8.12 bug fix 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/RHBA-2021:3511