Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1495540 - [3.6] oc adm router --expose-metrics fails by default
[3.6] oc adm router --expose-metrics fails by default
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Routing (Show other bugs)
3.6.1
Unspecified All
medium Severity medium
: ---
: 3.6.z
Assigned To: Phil Cameron
zhaozhanqi
:
Depends On: 1488954
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-26 05:29 EDT by zhaozhanqi
Modified: 2017-12-07 02:11 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: No doc changes needed Consequence: Fix: Result:
Story Points: ---
Clone Of: 1488954
Environment:
Last Closed: 2017-12-07 02:11:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Origin (Github) 16284 None None None 2017-09-26 05:29 EDT
Github openshift/ose/pull/888 None None None 2017-10-06 13:11 EDT
Red Hat Product Errata RHSA-2017:3389 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise security, bug fix, and enhancement update 2017-12-07 07:09:10 EST

  None (edit)
Comment 1 Phil Cameron 2017-10-04 14:17:28 EDT
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 08:51:12 EDT
Going to backport 
https://github.com/openshift/origin/issues/15982
to 3.6.1
Comment 3 Phil Cameron 2017-10-05 11:52:47 EDT
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 13:11:16 EDT
PR https://github.com/openshift/ose/pull/888
Comment 6 zhaozhanqi 2017-10-24 05:17:51 EDT
Verified this bug on openshift v3.6.173.0.59

this issue has been fixed.
Comment 9 errata-xmlrpc 2017-12-07 02:11:23 EST
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.