Bug 1571176 - [3.10] metrics API Proxy endpoint is deprecated in metrics.go
Summary: [3.10] metrics API Proxy endpoint is deprecated in metrics.go
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.z
Assignee: Luke Meyer
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1632983
TreeView+ depends on / blocked
 
Reported: 2018-04-24 09:00 UTC by Junqi Zhao
Modified: 2021-12-10 16:02 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The location of the master proxy API changed. Consequence: Since the MetricsApiProxy diagnostic uses this endpoint, it broke. Fix: The diagnostic was updated to look at the correct endpoint. Result: It should now work as expected.
Clone Of:
: 1632983 (view as bug list)
Environment:
Last Closed: 2019-01-30 15:13:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0206 0 None None None 2019-01-30 15:13:25 UTC

Description Junqi Zhao 2018-04-24 09:00:48 UTC
Description of problem:
Deploy metrics 3.10 and run `oc adm diagnostics MetricsApiProxy`, result shows "Unable to access the metrics API Proxy endpoint /api/v1/proxy/namespaces/openshift-infra/services/https:heapster:/api/v1/model/metrics"

*********************************************************************
#oc adm diagnostics MetricsApiProxy
[Note] Determining if client configuration exists for client/cluster diagnostics
Info:  Successfully read a client config file at '/root/.kube/config'
Info:  Using context for cluster-admin access: 'openshift-infra/ip-172-18-0-226-ec2-internal:8443/system:admin'

[Note] Running diagnostic: MetricsApiProxy
       Description: Check the integrated heapster metrics can be reached via the API proxy
       
ERROR: [DClu4003 from diagnostic MetricsApiProxy@openshift/origin/pkg/oc/admin/diagnostics/diagnostics/cluster/metrics.go:89]
       Unable to access the metrics API Proxy endpoint /api/v1/proxy/namespaces/openshift-infra/services/https:heapster:/api/v1/model/metrics:
       (*errors.StatusError) the server could not find the requested resource
       The Horizontal Pod Autoscaler is not able to retrieve metrics to drive scaling.
       
[Note] Summary of diagnostics execution (version v3.10.0-0.27.0):
[Note] Errors seen: 1
*********************************************************************

The endpoints already changed to "api/v1/namespaces/openshift-infra/services/https:heapster:/proxy/api/v1/model/metrics" since 3.10,see
https://github.com/kubernetes/kubernetes/pull/59884 


Version-Release number of selected component (if applicable):
# openshift version
openshift v3.10.0-0.27.0
kubernetes v1.10.0+b81c8f8
etcd 3.2.16


How reproducible:
Always

Steps to Reproduce:
1. Deploy metrics 3.10 and run `oc adm diagnostics MetricsApiProxy`
2.
3.

Actual results:
Unable to access the metrics API Proxy endpoint /api/v1/proxy/namespaces/openshift-infra/services/https:heapster:/api/v1/model/metrics

Expected results:
Should not have error

Additional info:

Comment 1 Juan Vallejo 2018-04-24 15:14:55 UTC
Assigning to Luke as this appears to be related with diagnostics

Comment 11 Junqi Zhao 2019-01-17 02:44:22 UTC
Issue is fixed.

# oc adm diagnostics MetricsApiProxy
[Note] Determining if client configuration exists for client/cluster diagnostics
Info:  Successfully read a client config file at '/root/.kube/config'
Info:  Using context for cluster-admin access: 'default/preserve-310-master-etcd-1:8443/system:admin'

[Note] Running diagnostic: MetricsApiProxy
       Description: Check the integrated heapster metrics can be reached via the API proxy
       
[Note] Summary of diagnostics execution (version v3.10.101):
[Note] Completed with no errors or warnings seen.

# openshift version
openshift v3.10.101

Comment 13 errata-xmlrpc 2019-01-30 15:13:18 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/RHBA-2019:0206


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