New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oc adm router --expose-metrics
generates DC which is incompatible with the latest prom/haproxy-exporter image
#15982
Comments
I suspect that now the router supports metrics, we should deprecate this option. This needs some investigation. |
I'm running a OO v1.4 cluster, and still have this issue. The "integrated" router metrics mentioned above don't work for me since they get constantly reset. As a workaround, I deployed the router as @jperville did, then modified the router deploymentconfig and added the missing "-" at the args section.
to:
|
We no longer support this path (we announced deprecation with innate metrics). The recommended path going forward is to manage your router config (plus image) as a config object. |
Removing --expose-metrics and --metrics-image is tracked by: |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
bug 1499026 https://bugzilla.redhat.com/show_bug.cgi?id=1499026 1499026 - Deprecate oc adm router --expose-metrics and --metrics-image origin issue: 15982 openshift#15982 OCP 3.11 Signed-off-by: Phil Cameron <pcameron@redhat.com>
bug 1499026 https://bugzilla.redhat.com/show_bug.cgi?id=1499026 1499026 - Deprecate oc adm router --expose-metrics and --metrics-image origin issue: 15982 openshift#15982 OCP 3.11 Signed-off-by: Phil Cameron <pcameron@redhat.com>
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
The
oc adm router --expose-metrics
command generates a router DC that runs theprom/haproxy-exporter:latest
image as sidecar to the main router container, as documented in https://docs.openshift.com/container-platform/3.5/install_config/router/default_haproxy_router.html#exposing-the-router-metrics .Recently, a new version of the
prom/haproxy-exporter
has been released which uses incompatible way to declare its options (prefixing with double dash instead of single one). As a consequence, theoc adm router --expose-metrics
can no longer use theprom/haproxy-exporter:latest
safely since that version has 2 incompatible ways to pass its arguments. We must specify the image version explicitly, and adjust the entrypoint args manually.With prom/haproxy-exporter:v0.7.1, the option to declare the scrape URI is called
-haproxy.scrape-uri
(with a single dash).As of prom/haproxy-exporter:v0.8.0, the same option is now prefixed with a double dash (
--haproxy.scrape-uri
).As a consequence, booting the metrics-exporter container using
-haproxy.scrape-uri=http://$(STATS_USERNAME):$(STATS_PASSWORD)@localhost:$(STATS_PORT)/haproxy?stats;csv
as the first entrypoint argument does not work anymore and the pod now crashes with the following message in the metrics-exporter container log:As a workaround, I tried to generate the DC by passing
--metrics-image
explicitly, but in this case the generated DC does not include entrypoint argument and the haproxy exporter image will boot but it will be unable to contact its scrape uri (since it was not passed any argument).My final workaround was to:
prom/haproxy-exporter:v0.8.0
entrypoint to make use the of DC's environment variables (see https://hub.docker.com/r/jperville/openshift-haproxy-exporter/ )oc adm router --expose-metrics --metrics-image=jperville/openshift-haproxy-exporter:v0.8.0
Version
Steps To Reproduce
Current Result
The router pod crashes in loop, then the deployment fails.
Expected Result
The router pod should start and serve metrics on port 9101.
The text was updated successfully, but these errors were encountered: