Bug 1871796 - Quotas card disappears from project overview page when normal user have quota for the project.
Summary: Quotas card disappears from project overview page when normal user have quota...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.6.0
Assignee: Robb Hamilton
QA Contact: Yanping Zhang
Depends On:
TreeView+ depends on / blocked
Reported: 2020-08-24 10:25 UTC by Yanping Zhang
Modified: 2020-08-31 09:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-08-26 18:24:30 UTC
Target Upstream Version:

Attachments (Terms of Use)
before-add-quota (222.40 KB, image/png)
2020-08-24 10:25 UTC, Yanping Zhang
no flags Details
after-add-quota (258.15 KB, image/png)
2020-08-24 10:26 UTC, Yanping Zhang
no flags Details
Screenshot of populated resource quota (76.70 KB, image/png)
2020-08-24 19:42 UTC, ralpert
no flags Details
F12console-networktab (194.34 KB, image/png)
2020-08-25 03:04 UTC, Yanping Zhang
no flags Details
Normal user view empty project overview page gets thousands of error (841.90 KB, image/png)
2020-08-26 09:13 UTC, Yadan Pei
no flags Details
Working project page with normal user (102.79 KB, image/png)
2020-08-26 18:25 UTC, Samuel Padgett
no flags Details

System ID Priority Status Summary Last Updated
Github openshift console pull 6456 None closed Bug 1871796: Use JSON.stringify to compare resources object in watch hooks 2020-09-21 14:32:13 UTC

Description Yanping Zhang 2020-08-24 10:25:55 UTC
Created attachment 1712330 [details]

Description of problem:
Normal user have a project, and on the project overview page, there is "Resource Quotas" card at the bottom, after create a quota for the project, check the project overview again, the "Resource Quotas" card disappears.

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

How reproducible:

Steps to Reproduce:
1.Normal user have a project, check the project overview page.

2.Create a quota for the project by cluster admin.
$ oc create quota myquota1 --hard=cpu=1,requests.memory=1G,limits.cpu=2,limits.memory=2G,pods=2,services=3 -n prozyp1

3.Check the project overview page again.

Actual results:
1. There is "Resource Quotas" card at the bottom,
2. Quota is added to the project.
3. The "Resource Quotas" card disappears from project overview page.

Expected results:
3. The "Resource Quotas" card should not disappear, and quota chart should show up.

Additional info:

Comment 1 Yanping Zhang 2020-08-24 10:26:39 UTC
Created attachment 1712331 [details]

Comment 2 ralpert 2020-08-24 19:40:01 UTC
I'm not seeing this? I'm on master (pulled the latest and ran yarn install, etc.). I'll try a different cluster.

Comment 3 ralpert 2020-08-24 19:42:59 UTC
Created attachment 1712431 [details]
Screenshot of populated resource quota

Are there other steps that need to be taken to recreate this? I just tried this again on a shared cluster with 4.6.0-0.nightly-2020-08-24-062015, and I'm seeing the resource quota section populate just fine.

Comment 4 Samuel Padgett 2020-08-24 20:08:20 UTC
It looks to me like the browser couldn't connect to the server based on what I see in the console. Are you sure you had a good network connection and the server was still available?

Moving to WORKSFORME since we can't reproduce.

Comment 5 Yanping Zhang 2020-08-25 02:48:16 UTC
@ralpert, are you login with a normal user or a cluster admin when checking resource quota on project overview page? The issue occurs with normal user. Cluster admin user could see resource quota.

Comment 6 Yanping Zhang 2020-08-25 03:02:33 UTC
Still could reproduce the bug。And normal user login console, the console response becomes very slow, many errors in F12 console. Cluster admin user has no this issue.

Comment 7 Yanping Zhang 2020-08-25 03:04:03 UTC
Created attachment 1712461 [details]

Comment 8 Yadan Pei 2020-08-26 09:13:57 UTC
Created attachment 1712651 [details]
Normal user view empty project overview page gets thousands of error

When a normal user goes to an empty project Overview page, we can see thousands of error thrown and console can not give any response

Comment 9 Yadan Pei 2020-08-26 09:14:54 UTC
I'm not sure if they're the same issue

Comment 10 Yadan Pei 2020-08-26 09:17:33 UTC
for the behavior in comment 8, I didn't create resourcequota at all

Comment 11 Samuel Padgett 2020-08-26 18:24:30 UTC
I logged in as a normal user and don't see this behavior. The page loads properly, and resource quotas appear when they are created. I'm testing 4.6.0-0.nightly-2020-08-02-134243. See screenshots. The user `test` has no special privileges.

All users should be able to list consolelinks for instance, and I see errors for those. I think this might be something in your environment. I can't reproduce.

Is there any chance you're trying to access a project where the user doesn't have `edit` or `view` access? Can you try a different cluster?

Comment 12 Samuel Padgett 2020-08-26 18:25:07 UTC
Created attachment 1712732 [details]
Working project page with normal user

Comment 13 Samuel Padgett 2020-08-26 18:30:26 UTC
I realize now the cluster from comment #11 is pretty old. I'm going to stand up a newer cluster to test the latest.

Comment 14 Samuel Padgett 2020-08-26 19:10:43 UTC
I'm able to reproduce the consolelinks problem, regression from https://github.com/openshift/console/pull/6180. Reopening and assigning to Robb to investigate.

Comment 15 Robb Hamilton 2020-08-26 21:31:09 UTC
The bug was the result of an issue with the useK8sWatchResource hook, which Rastislav fixed with https://github.com/openshift/console/pull/6456.

Comment 19 Yanping Zhang 2020-08-31 09:18:50 UTC
Checked on 4.6 cluster with payload 4.6.0-0.nightly-2020-08-31-012413.
Now normal user login console, the project overview page could load resource quota card with existing quota charts successfully, and the console response becomes fast now.
The bug is fixed.

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