Bug 1721428 - Error: Metrics might not be configured by your cluster administrator. Metrics are required for autoscaling
Summary: Error: Metrics might not be configured by your cluster administrator. Metrics...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.11.z
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-18 09:32 UTC by Daein Park
Modified: 2019-07-23 19:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the web console showed a misleading warning that metrics might not configured for horizontal pod autoscalers when only the metrics server had been set up. The warning has been removed.
Clone Of:
Environment:
Last Closed: 2019-07-23 19:56:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1753 0 None None None 2019-07-23 19:56:33 UTC

Description Daein Park 2019-06-18 09:32:33 UTC
Description of problem:

Web console shows "Metrics might not be configured by your cluster administrator. Metrics are required for autoscaling" alert message, 
even though HPA works well after installing metrics-server via [0] steps.

[0] Requirements for Using Horizontal Pod Autoscalers
    [https://docs.openshift.com/container-platform/3.11/dev_guide/pod_autoscaling.html#req-for-using-hpas]
~~~
$ ansible-playbook \
/usr/share/ansible/openshift-ansible/playbooks/metrics-server/config.yml \
-e openshift_metrics_server_install=true
~~~

This error messages is disappeared when cluster metrics hawkular stack is installed.
But it can reproduce as being empty "metricsPublicURL" value after installing hawkular stacks.

Version-Release number of selected component (if applicable):

# oc version
oc v3.11.98
kubernetes v1.11.0+d4cacc0

How reproducible:

You can reproduce as following steps.

1> install only metrics-server 
  $ ansible-playbook \
  /usr/share/ansible/openshift-ansible/playbooks/metrics-server/config.yml \
  -e openshift_metrics_server_install=true

2> Configure HPA to some pods and check whether "oc adm top pod" works well.

3> Access Web console and move the page through "Application" -> "Deployments" -> "Configuration" Tab -> Look "Autoscaling" Section.
   Even though all autoscaling parameter is displayed but "Metrics might not be configured by your cluster administrator. Metrics are required for autoscaling" message is shown.

It can reproduce after installation of Hawkular stack as being empty "metricsPublicURL" value either.

Steps to Reproduce:
1.
2.
3.

Actual results:

"Metrics might not be configured by your cluster administrator. Metrics are required for autoscaling" alert message is shown from web console.

Expected results:

No alert messages, because HPA is working well.

Additional info:

Comment 1 Daein Park 2019-06-18 12:32:17 UTC
Hi team, my question is if "metrics-server" only installed, can current web console detect it as enabled HPA ? 
I think the condition is only whether or not cluster metrics is installed at now.

Thanks,
Daein

Comment 3 Daein Park 2019-06-18 23:39:59 UTC
I appreciate your help and quick update @Samuel

Comment 5 Yadan Pei 2019-07-16 08:11:23 UTC
1. Enable metrics server and confirm `oc adm top node/pod` works
# oc get apiservices|grep metrics
v1beta1.metrics.k8s.io                 2019-07-16T07:16:37Z
# oc adm top node
NAME                           CPU(cores)   CPU%      MEMORY(bytes)   MEMORY%   
qe-gpei-311pub3master-etcd-1   997m         49%       3967Mi          54%       
qe-gpei-311pub3master-etcd-2   938m         46%       3631Mi          50%       
qe-gpei-311pub3master-etcd-3   1079m        53%       3775Mi          52%       
qe-gpei-311pub3node-1          1248m        62%       3263Mi          45%       
qe-gpei-311pub3node-2          315m         15%       3142Mi          43%       
qe-gpei-311pub3node-infra-1    323m         16%       3018Mi          41%       
qe-gpei-311pub3node-infra-2    328m         16%       3054Mi          42%
# oc adm top pod
NAME                                   CPU(cores)   MEMORY(bytes)   
catalog-operator-76c846684c-rnsvs      2m           19Mi            
etcd-operator-7b49974f5b-d7flt         5m           22Mi            
example-4q2kdl8xwz                     26m          14Mi            
example-6xtptszz4p                     16m          10Mi            
example-mdzzdnkpvk                     18m          12Mi            
olm-operator-5b7f7c4556-xp9fj          1m           9Mi             
prometheus-operator-7fccbd7c74-ssnw9   0m           7Mi     

2. Access Web console and move the page through "Application" -> "Deployments" -> "Configuration" Tab -> Look "Autoscaling" Section
No warn message ""Metrics might not be configured by your cluster administrator. Metrics are required for autoscaling" alert message is shown from web console."

3. Confirm the PR has been merged in 3.11.129
[yapei@dhcp-141-192 origin-web-console-server]$ git log --pretty="%h %cd - %s (%an)" --date=local atomic-openshift-web-console-3.11.129-1 -1
7a7adeec5 Thu Jul 11 00:27:17 2019 - bump origin-web-console 6a131a0f (AOS Automation Release Team)
[yapei@dhcp-141-192 origin-web-console]$ git log 6a131a0f | grep '#3132'
    Merge pull request #3132 from spadgett/metrics-warning

Comment 7 errata-xmlrpc 2019-07-23 19:56: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/RHBA-2019:1753


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