Bug 1495540 - [3.6] oc adm router --expose-metrics fails by default
Summary: [3.6] oc adm router --expose-metrics fails by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.6.1
Hardware: Unspecified
OS: All
medium
medium
Target Milestone: ---
: 3.6.z
Assignee: Phil Cameron
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On: 1488954
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-26 09:29 UTC by zhaozhanqi
Modified: 2022-08-04 22:20 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: No doc changes needed Consequence: Fix: Result:
Clone Of: 1488954
Environment:
Last Closed: 2017-12-07 07:11:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ose pull 888 0 None None None 2017-10-06 17:11:31 UTC
Origin (Github) 16284 0 None None None 2017-09-26 09:29:42 UTC
Red Hat Product Errata RHSA-2017:3389 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise security, bug fix, and enhancement update 2017-12-07 12:09:10 UTC

Comment 1 Phil Cameron 2017-10-04 18:17:28 UTC
The real problem here is the sidecar is picking up:
image: 'prom/haproxy-exporter:latest'

That is 'latest', not the specific version that runs with your version of OCP. When 'prom/haproxy-exporter' was updated, every existing router with the sidecar will fail on restart. It also means the 'latest' sidecar will be running on older OCP versions after restart.

The fix for existing routers is to edit the router DCs that are running the side car with the version that runs with the installed OCP version.

From: https://github.com/openshift/origin/issues/15982

prom/haproxy-exporter:v0.7.1 is for the -haproxy.scrape-uri

and

prom/haproxy-exporter:v0.8.0 is for the --haproxy.scrape-uri

This fix will allow 'oc adm router' to create new routers that will use the 'latest' sidecar.

The sidecar is deprecated and replaced by the integrated prometheus scraper, so it will be going away in a future release.

Comment 2 Phil Cameron 2017-10-05 12:51:12 UTC
Going to backport 
https://github.com/openshift/origin/issues/15982
to 3.6.1

Comment 3 Phil Cameron 2017-10-05 15:52:47 UTC
Actually, here is the change:

https://github.com/openshift/origin/commit/8573e88f77207f38abd59b70ab0c4fff9a61d632
Handle the changed --haproxy.scrape-uri argument (- to --)

The argument changed from -haproxy.scrape to --haproxy.scrape.  This
makes 'oc adm --expose-metrics' handle the change.

Fixes bug 1488954 (https://bugzilla.redhat.com/show_bug.cgi?id=1488954)

Comment 5 Ben Bennett 2017-10-06 17:11:16 UTC
PR https://github.com/openshift/ose/pull/888

Comment 6 zhaozhanqi 2017-10-24 09:17:51 UTC
Verified this bug on openshift v3.6.173.0.59

this issue has been fixed.

Comment 9 errata-xmlrpc 2017-12-07 07:11:23 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/RHSA-2017:3389


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