Description of problem: Having issues pulling statistics for HAProxy router when ROUTER_METRICS_TYPE=haproxy: # oc rsh router-1-xx123 sh-4.2$ curl -u admin:password localhost:1936 Forbidden: User "system:anonymous" cannot get routers.route.openshift.io at the cluster scope The symptoms are simlar and workaround of unsetting ROUTER_METRICS_TYPE (oc env dc/router ROUTER_METRICS_TYPE- -n default) is similar to issue in bz1467257. However, the manifesting error is different. Version-Release number of selected component (if applicable): 3.9 How reproducible: always Additional notes: If I have ROUTER_METRICS_TYPE=haproxy, STATS_USERNAME, and STATS_PASSWORD all set, the I receive a 404: sh-4.2$ curl -u admin:password localhost:1936 404 page not found
I think for the first case you don't have STATS_USERNAME and STATS_PASSWORD set... can you please clarify? (Or just include all of 'oc env dc router --list') For the second case you need: curl "http://$STATS_USERNAME:$STATS_PASSWORD@localhost:$STATS_PORT/metrics"
Correct, the first case I do not have STATS_USERNAME and STATS_PASSWORD enabled. Here's each combination of STATS_USERNAME/STATS_PASSWORD and ROUTER_METRICS_TYPE. The only combination that works is when ROUTER_METRICS_TYPE is unset. I probably should have specified that in my first comment, sorry: # oc rsh router-7-gbdfz sh-4.2$ curl -u admin:password localhost:1936 Forbidden: User "system:anonymous" cannot get routers.route.openshift.io at the cluster scope sh-4.2$ curl localhost:1936 Forbidden: User "system:anonymous" cannot get routers.route.openshift.io at the cluster scope sh-4.2$ env | grep STATS STATS_PORT=1936 sh-4.2$ env | grep ROUTER_METRICS_TYPE ROUTER_METRICS_TYPE=haproxy sh-4.2$ exit # oc env dc/router STATS_USERNAME=admin STATS_PASSWORD=password -n default deploymentconfig "router" updated # oc rsh router-8-sfj5c sh-4.2$ curl -u admin:password localhost:1936 404 page not found sh-4.2$ env | grep STATS STATS_USERNAME=admin STATS_PASSWORD=password STATS_PORT=1936 sh-4.2$ env | grep ROUTER_METRICS_TYPE ROUTER_METRICS_TYPE=haproxy # oc env dc/router ROUTER_METRICS_TYPE- -n default deploymentconfig "router" updated sh-4.2$ curl -u admin:password localhost:1936 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ..... trimmed sh-4.2$ env | grep STATS STATS_USERNAME=admin STATS_PASSWORD=password STATS_PORT=1936 sh-4.2$ env | grep ROUTER_METRICS_TYPE <nothing>
Can you get me the full router deployment config please? (oc get dc router -o yaml) And what stats format are they looking for? The new ROUTER_METRICS_TYPE=haproxy ones?
> And what stats format are they looking for? The new ROUTER_METRICS_TYPE=haproxy ones? I see that I missed the /metrics part of your first reply. My command output does not include /metrics which *does* give me the prometheus style output after setting the STATS_USERNAME and STATS_PASSWORD. Just some confusion over the path change from one router metric type to the other. I think we can close this case NOTABUG given this.