Bug 1775250 - Metrics endpoints of catalog-operator and olm-operator are potentially broken by service CA rotation
Summary: Metrics endpoints of catalog-operator and olm-operator are potentially broken...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.2.z
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 4.2.z
Assignee: Jeff Peeler
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On: 1777593
Blocks: 1775253
TreeView+ depends on / blocked
 
Reported: 2019-11-21 15:37 UTC by Nick Hale
Modified: 2020-01-07 17:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1771811
Environment:
Last Closed: 2020-01-07 17:55:10 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1170 'None' closed bug 1775250: make certificate updates live upon update 2020-04-08 03:36:24 UTC
Red Hat Product Errata RHBA-2020:0014 None None None 2020-01-07 17:55:23 UTC

Comment 2 Jian Zhang 2019-12-17 06:36:34 UTC
Cluster version is 4.2.0-0.nightly-2019-12-15-230238
mac:~ jianzhang$ oc exec catalog-operator-67687b4458-mw8gs -- olm --version
OLM version: 0.11.0
git commit: 68a313001672be96bd094840839f9e755e9b9606

mac:~ jianzhang$ oc get pods
NAME                                READY   STATUS    RESTARTS   AGE
catalog-operator-67687b4458-mw8gs   1/1     Running   0          31m
olm-operator-67d4486cd4-gjsx5       1/1     Running   0          31m
packageserver-5cf7589445-5wk2p      1/1     Running   0          29m
packageserver-5cf7589445-xs6vb      1/1     Running   0          29m

mac:~ jianzhang$ oc port-forward catalog-operator-67687b4458-mw8gs  8081:8081
Forwarding from 127.0.0.1:8081 -> 8081
Forwarding from [::1]:8081 -> 8081
Handling connection for 8081

1, Open another terminal to save the cert info.
mac:~ jianzhang$ echo | openssl s_client -connect localhost:8081 2>&1 | gsed --quiet '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > bug.crt
mac:~ jianzhang$ 

2, Delete the secret catalog-operator-serving-cert and olm-operator-serving-cert. And, wait for they are rebuilt.
mac:~ jianzhang$ oc get secret
NAME                                          TYPE                                  DATA   AGE
builder-dockercfg-w9w6v                       kubernetes.io/dockercfg               1      27m
builder-token-llmqm                           kubernetes.io/service-account-token   4      27m
builder-token-sv9q4                           kubernetes.io/service-account-token   4      28m
catalog-operator-serving-cert                 kubernetes.io/tls                     2      8s
default-dockercfg-qrmsg                       kubernetes.io/dockercfg               1      27m
default-token-n24qm                           kubernetes.io/service-account-token   4      28m
default-token-ttc7f                           kubernetes.io/service-account-token   4      33m
deployer-dockercfg-q75hp                      kubernetes.io/dockercfg               1      27m
deployer-token-5q7s9                          kubernetes.io/service-account-token   4      27m
deployer-token-v7rmt                          kubernetes.io/service-account-token   4      28m
olm-operator-serviceaccount-dockercfg-n8p7l   kubernetes.io/dockercfg               1      27m
olm-operator-serviceaccount-token-tmlcz       kubernetes.io/service-account-token   4      33m
olm-operator-serviceaccount-token-zc4jf       kubernetes.io/service-account-token   4      27m
olm-operator-serving-cert                     kubernetes.io/tls                     2      7s
v1.packages.operators.coreos.com-cert         kubernetes.io/tls                     2      31m

3, Save the new cert. 
mac:~ jianzhang$ oc port-forward catalog-operator-67687b4458-mw8gs  8081:8081
Forwarding from 127.0.0.1:8081 -> 8081
Forwarding from [::1]:8081 -> 8081
Handling connection for 8081

mac:~ jianzhang$ echo | openssl s_client -connect localhost:8081 2>&1 | gsed --quiet '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > bug2.crt
mac:~ jianzhang$ 

4, Compare the two certs.
mac:~ jianzhang$ diff bug.crt bug2.crt 
2c2
< MIIEFjCCAv6gAwIBAgIIPsKClSdnHFEwDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UE
---
> MIIEFjCCAv6gAwIBAgIILsIgsgiAR+MwDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UE
4c4
< Fw0xOT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ud
18,23c18,23
< YWQ1YTkzMA0GCSqGSIb3DQEBCwUAA4IBAQBLCi9+tsb3UERjejn/jXoOV/urML74
< GzHM2ngyHNufv5Z47vQbJ6iWF7EU/3plTr+mkLbu7FQxKAYITj+3YNUdzRg6G+z6
< JRUVeilx0eFBgbq7nXyQJ5kZHn1/e9YtiV4wRftJaByvX60JYMuB7SneQCq922gH
< wJxvohTuoTSvtnyk+W6QKyT+M1wCafTEzjh8zgWOFIGPJAziQTZcem21EpXg5EOZ
< IYGUynqZRuuFn3Tg/bisQolSbhBcvRG7C8zrDD3GlSRbiESfE03MciPHxtT7FQMr
< ec1ec9wAAEbgyLDkyvuzbFsdCVj/KvsNJ6YlB026OQ3bYQZ9Y1/1U4LI
---
> YWQ1YTkzMA0GCSqGSIb3DQEBCwUAA4IBAQCvWl0prgSsCGUWpKcRf5+NVx8VTUn6
> 4FYotLwkVMDsTE6M8X9iKaUpcdoTAXXhrlTsDKL2LUA40UQ4av4pWA3/UNLdpXSD
> 2apBMC1NMG7boA3IiShxNuxwm+FalSaRycwwiTF7hi6+SypebpFBCIISDBRrVd2g
> paTB7qb0AW0Im0nTJJlnfQCE7nti3QYDYwjQhyNQEwl1V70hHFV1QdXRthN1ICxo
> DeUa9lnzZPcaWt/K21nU2bQG1QAFsA9ixbBz/NQaa/v8UcfRfyZ9AU7/PwUQJxpY
> VcptIC9AalkO0qwf2AQmEaamC5mX/ASLy6kLSTAfdKHjCP0EEaa3ON98

They are different, LGTM, verify it.

Comment 4 errata-xmlrpc 2020-01-07 17:55:10 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:0014


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