Bug 1495540

Summary: [3.6] oc adm router --expose-metrics fails by default
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Phil Cameron <pcameron>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, bbennett, bmeng, eparis, mrobson, stwalter, xtian
Version: 3.6.1   
Target Milestone: ---   
Target Release: 3.6.z   
Hardware: Unspecified   
OS: All   
Whiteboard:
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 07:11:23 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:
Bug Depends On: 1488954    
Bug Blocks:    

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