Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1748871

Summary: prometheus unable to monitor etcd with x509 error logged
Product: OpenShift Container Platform Reporter: David Caldwell <dcaldwel>
Component: MonitoringAssignee: Sergiusz Urbaniak <surbania>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: alegrand, anpicker, erooth, fbranczy, gferrazs, jnordell, kakkoyun, kgeorgie, lcosic, mloibl, nnosenzo, pkrupa, spasquie, surbania
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-13 09:20:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Caldwell 2019-09-04 10:51:04 UTC
Description of problem:

After deploying monitoring, Prometheus is unable to access etcd and the logs show x509 error.

Sounds similar to https://bugzilla.redhat.com/show_bug.cgi?id=1645417


Version-Release number of selected component (if applicable):

3.11


How reproducible:

1. Deploy Prometheus monitoring
2. Prometheus is unable to monitor etcd due to not having a secret
3. Create the kube-etcd-client-certs secret in the openshift-monitoring project
4. Prometheus does not detect and use this new secret and so still cannot monitor etcd
5. A temporary workaround is to manually add the secret in the GUI which allows the daemon set to be created -- but this does not persist


Actual results:

The Prometheus operator does not automatically create a secret to monitor etcd.
A manually added secret does not get noticed by Prometheus operator.
A manually added secret using the 'add this secret to an application' dialogue in the GUI works around this issue but does not persist.

This error is seen in Prometheus log:

level=error ts=2019-08-15T11:12:15.605123238Z caller=scrape.go:148 component="scrape manager" scrape_pool=openshift-monitoring/etcd/0 msg="Error creating HTTP client" err="unable to use specified CA cert /etc/prometheus/secrets/kube-etcd-client-certs/etcd-client-ca.crt: open /etc/prometheus/secrets/kube-etcd-client-certs/etcd-client-ca.crt: no such file or directory


Expected results:

1. Prometheus should create the correct secret for monitoring etcd or 
2. Prometheus should detect that a secret for monitoring etcd has been created.
3. Also, a secret added in the GUI should persist.

Comment 1 David Caldwell 2019-09-04 14:19:41 UTC
oc v3.11.98
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://master.redacted.com:8443
openshift v3.11.98
kubernetes v1.11.0+d4cacc0

Comment 18 Simon Pasquier 2019-11-18 11:00:56 UTC
*** Bug 1772948 has been marked as a duplicate of this bug. ***