Bug 1503450 - 3.7.1 White spaces in the cert prevents Origin Metrics from starting
Summary: 3.7.1 White spaces in the cert prevents Origin Metrics from starting
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: 3.7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.7.z
Assignee: Juraci Paixão Kröhling
QA Contact: Junqi Zhao
Depends On: 1471251
Blocks: 1500464 1500471
TreeView+ depends on / blocked
Reported: 2017-10-18 07:23 UTC by Juraci Paixão Kröhling
Modified: 2020-12-14 10:33 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
When either a certificate within the chain at `serviceaccount/ca.crt` or any of the certificates within the provided truststore file contain a white space after the `BEGIN CERTIFICATE` declaration, the Java keytool rejects the certificate with an error, causing Origin Metrics to fail to start. As a workaround, Origin Metrics will now attempt to remove the spaces before feeding the certificate to the Keytool, but admins should make sure their certificates don't contain such spaces.
Clone Of: 1471251
Last Closed: 2017-11-28 22:17:38 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Comment 1 Juraci Paixão Kröhling 2017-10-18 08:08:05 UTC
The fix is available on this build:

Comment 2 Junqi Zhao 2017-10-20 12:53:07 UTC
Tested with metrics-hawkular-metrics:3.7.0-
1. Add more spaces to the end of "-----BEGIN CERTIFICATE-----" in /etc/origin/master/ca-bundle.crt.
2. Restart server and deploy metrics 3.7 by using image metrics-hawkular-metrics:3.7.0- 
   sh-4.2$cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt

   sh-4.2$cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt

   #oc rsh ${HEAPSTER_PODS};
   sh-4.2$cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt

"-----BEGIN CERTIFICATE-----" field don't have spaces in /var/run/secrets/kubernetes.io/serviceaccount/ca.crt of each pod, beside this, the content is thse same with /etc/origin/master/ca-bundle.crt.

4. Sanity testing of Metrics, it works well.

# openshift version
openshift v3.7.0-0.143.7
kubernetes v1.7.0+80709908fd
etcd 3.2.1

Comment 5 errata-xmlrpc 2017-11-28 22:17: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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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