Bug 1501164 - [online-int][online-stg][free-int][free-stg][rh-us-east-1] User should not see the Edit Resources Limit page's input boxes that can be set but not applied in pod due to ClusterResourceOverride
Summary: [online-int][online-stg][free-int][free-stg][rh-us-east-1] User should not se...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.7.z
Assignee: David Eads
QA Contact: Yadan Pei
URL:
Whiteboard:
: 1533564 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-12 07:40 UTC by Xingxing Xia
Modified: 2018-04-05 09:30 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the ClusterResourceOverride admission controller configuration was not passed through to the web console. This meant that the web console was showing fields for resource requests and limits in its forms that were calculated values and should have been hidden in the UI. The problem has been fixed, and the calculated request and limit fields are correctly hidden in the web console.
Clone Of:
: 1562286 (view as bug list)
Environment:
Last Closed: 2018-04-05 09:29:37 UTC
Target Upstream Version:


Attachments (Terms of Use)
free-int_edit_resource_limits_page (70.99 KB, image/png)
2017-10-12 07:40 UTC, Xingxing Xia
no flags Details
CPU request and limit and memory request can be set but not applied in pod (video) (1.05 MB, application/octet-stream)
2017-11-03 06:55 UTC, Xingxing Xia
no flags Details
3.7.40 fixed result (76.82 KB, image/png)
2018-03-26 06:55 UTC, Xingxing Xia
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1324825 medium CLOSED Better to adjust min value shown in web console Set Resource Limits page when ClusterResourceOverride request/limit rati... 2020-10-14 00:28:05 UTC
Red Hat Product Errata RHBA-2018:0636 None None None 2018-04-05 09:30:13 UTC

Internal Links: 1324825

Description Xingxing Xia 2017-10-12 07:40:54 UTC
Created attachment 1337567 [details]
free-int_edit_resource_limits_page

Description of problem:
The configuration about cluster resource override does not take effect. This can be shown on web console: both Memory/CPU, Limit/Request can be shown in the Edit Resource Limits page, and the scope is wrong, e.g.Memory is shown "100 MiB min to ..."
See screenshot
free-stg does not have the problem

Version-Release number of selected component (if applicable):
v3.7.0-0.147.0 (online version 3.6.0.38)

How reproducible:
Always

Steps to Reproduce:
1. Already clear in above description

Actual results:

Expected results:

Additional info:

Comment 1 Xingxing Xia 2017-11-02 08:24:16 UTC
(In reply to Xingxing Xia from comment #0)
> Description of problem:

> free-stg does not have the problem

Now upgraded free-stg [v3.7.0-0.178.2 (online version 3.6.0.35)] also has the same issue. Please check

Comment 2 Abhishek Gupta 2017-11-02 21:57:32 UTC
What are the expected results? Can you please clarify what is expected to be different?

Notes:
1. The resource limits are no longer being hidden in the UI
2. The min pod/container memory "limit" has been lowered to 200Mi
3. The memory request->limit ratio is now 0.5 (50%)
4. The new request->limit ratio results in min memory "request" of 100Mi

Comment 3 Xingxing Xia 2017-11-03 04:01:21 UTC
Sorry, didn't get to know the changes happen as your "Notes" :) It was thought well known issue since https://bugzilla.redhat.com/show_bug.cgi?id=1324825#c12 and later reoccurred in other bugs https://url.corp.redhat.com/1522957 (RH internal), the attached case OSE/workitem?id=OCP-10075 from online sub-team was for tracking it, which checks Online UI should only show the input box of Memory Limit.

Per your "Notes", I checked points 2 ~ 4 are working in free-stg.
However, in the DC Edit/Set Resource Limits page, when input and save:
CPU request 50m, limit 200m
Memory request 120Mi, limit 200Mi

The DC's pod yaml is:
      resources:
        limits:
          cpu: 390m
          memory: 200Mi
        requests:
          cpu: 19m
          memory: 100Mi

Per it, the input for CPU request/limit and Memory request are ignored. But
UI allows user inputs for them. This is bug. And your point 1 seems not the actual result.

Comment 4 Xingxing Xia 2017-11-03 06:55:55 UTC
Created attachment 1347169 [details]
CPU request and limit and memory request can be set but not applied in pod (video)

Comment 5 Samuel Padgett 2017-11-07 14:32:40 UTC
`limitRequestOverrides` are not being set in the config.js that comes back to the web console, which usually means that `ClusterResourceOverrides` are not set in master-config.yaml.

https://docs.openshift.org/latest/admin_guide/overcommit.html#configuring-masters-for-overcommitment

Comment 6 Bing Li 2018-01-16 06:30:19 UTC
Same issue on online-int:
OpenShift Master:    v3.7.9 (online version 3.6.0.90)
Kubernetes Master:   v1.7.6+a08f5eeb62

Comment 7 Samuel Padgett 2018-01-16 13:08:55 UTC
The config is not getting plumbed through to the console by the API server in 3.7 as discovered in Bug 1533564.

3.7 fix: https://github.com/openshift/origin/pull/18076
3.8 fix: https://github.com/openshift/origin/pull/18077

Comment 8 Samuel Padgett 2018-01-16 13:09:45 UTC
*** Bug 1533564 has been marked as a duplicate of this bug. ***

Comment 9 Bing Li 2018-02-05 11:00:28 UTC
Now the ResourceOverride is enabled on free-int: only memory limit is shown on resource limit page. But the scope is still wrong: "Can't be less than 100 MiB". It should be "200Mi" instead of "100Mi".

Comment 10 Samuel Padgett 2018-02-06 13:28:07 UTC
bingli@redhat.com -- you need to test 3.7.z to verify the fix. We've changed how it works in 3.9, and free-int is now on 3.9.

Comment 12 Xingxing Xia 2018-03-01 08:55:57 UTC
Hi, Samuel, there are two problems:
A. one is comment 9 about the min value, min value should min memory limit that can be input and make pod running.

B. Comment 7's 3.7 fix PR is merged in origin release-3.7, but not picked up in OCP enterprise-3.7:
$ cd /local/github.com/ose_repo; git pull
$ git checkout -b enterprise-3.7 upstream/enterprise-3.7
$ git log --pretty="%h %cd - %s (%an)" upstream/enterprise-3.7 | grep "plumb through the clusterresourceoverride" # get empty output
# While 3.8 picked:
git log --pretty="%h %cd - %s (%an)" upstream/enterprise-3.8 | grep "plumb through the clusterresourceoverride"
dff8f87855 Thu Jan 11 12:59:05 2018 -0500 - plumb through the clusterresourceoverride settings (David Eads)

Also double confirmed the test by launching latest 3.7.35 env, web console still shows CPU, steps are:
1. Add in master-config.yaml
admissionConfig:
  pluginConfig:
    ClusterResourceOverride:
      ...

Restart master.

(In OCP 3.9, need extra `oc edit cm/webconsole-config -n openshift-web-console`, add below `true` and re-deploy web console pod:
data:
  webconsole-config.yaml: |
    features:
      clusterResourceOverridesEnabled: true

**** In OCP 3.7, web is not seprated, does it need what extra setting? Is above master-config.yaml modification and master restart enough? ****
)
2. In the test project, set limitrange that is `oc export`ed from free-int
3. Re-login to web console, check DC Edit Resources Limit page

Comment 13 Samuel Padgett 2018-03-01 12:40:52 UTC
> Comment 7's 3.7 fix PR is merged in origin release-3.7, but not picked up in OCP enterprise-3.7

David, can you check?

> In OCP 3.7, web is not seprated, does it need what extra setting? Is above master-config.yaml modification and master restart enough? 

Correct. You don't need that setting in 3.7.

Comment 15 Xingxing Xia 2018-03-02 09:24:49 UTC
(In reply to Xingxing Xia from comment #12)
> Hi, Samuel, there are two problems:
> A. one is comment 9 about the min value, min value should min memory limit
> that can be input and make pod running.
Samuel, this display issue can be seen in free-int 3.9, is there PR for it? If need separate web bug for tracking it, I'll open one, thanks

Comment 16 Samuel Padgett 2018-03-02 13:02:39 UTC
100MiB is now allowed, so the min is correct. See https://github.com/openshift/origin/pull/18553

Comment 19 Xingxing Xia 2018-03-06 02:40:57 UTC
Will verify when above new 3.7 PR merged

Comment 21 Xingxing Xia 2018-03-26 06:55:54 UTC
Created attachment 1412972 [details]
3.7.40 fixed result

Tracked puddle update, 3.7 PR is merged into 3.7 OCP since v3.7.40 (latest version).
Tested per comment 12 steps in v3.7.40 env, bug is fixed, web console now only shows Memory limit input box and the input range is right.
Clusters in bug title are already 3.9 or to be 3.9 in which version the issue is already fixed.
Thus move bug to VERIFIED

Comment 22 Bing Li 2018-03-27 06:14:18 UTC
For online-stg, it's still version v3.7.23 (online version 3.6.0.90). So this issue still exists.

Will verify this bug once online-stg is upgraded.

Comment 24 Bing Li 2018-03-30 02:52:06 UTC
Move this bug to verified.

I've filed a bug especially for online environments: bug 1562286

Comment 28 errata-xmlrpc 2018-04-05 09:29:37 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-2018:0636


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