Bug 1815189 - feature flagged UI does not always become available after operator installation
Summary: feature flagged UI does not always become available after operator installation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard: Scrubbed
: 1832706 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-19 18:05 UTC by cvogt
Modified: 2022-03-12 04:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When an operator adds an API to an existing API group, it does not trigger API discovery. Consequence: Newly added API is not seen by the front end until a page refresh occurs Fix: For users with permission, watch CRDs instead of APIServiceModels and re-run API discovery whenever any CRD is added or removed. For users without permission to watch CRDs, poll API discovery. For all users, re-run API discovery the first time an API isn't found in the definitions. Result: If an operator adds a new API to an existing API group, the front end API definitions will be updated without requiring a page reload.
Clone Of:
Environment:
Version: 4.5.0-0.ci-2020-03-17-123117 Cluster ID: 7cf2bdac-1124-49a9-ac4e-5a206e569bde Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36 Edg/80.0.361.66
Last Closed: 2022-03-12 04:34:40 UTC
Target Upstream Version:
Embargoed:
jonjacks: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10162 0 None Merged Bug 1815189, Bug 1997269: Improve API discovery for feature flags and operator details 2021-11-15 17:01:32 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-12 04:34:54 UTC

Description cvogt 2020-03-19 18:05:11 UTC
Description of problem:
As a cluster admin, after installing an operator for which the console provides UI for, I expect that UI to become enabled without needing to refresh the browser. There is a race condition however as the console watches the APIServiceModel to recognize when to update the available feature flags. The problem here is that the knative serving api group first becomes available with a subset of the knative serving CRDs. Therefore the first time the console is notified of the new group, it only enables a few feature flags. Later on more CRDs are installed into the same API group but there are no new notifications. Therefore the UI flagged against those CRDs never gets enabled until the user refreshes their browser or a new api group is added which re-runs the whole discovery process again.

A polling method is used for non-admin users which suffers from the same issue because, for performance reasons, the api discovery is only run if there is a change in the available api groups, but not if there's a change in the number of resources provided within an already existing api group.


How reproducible:


Steps to Reproduce:
1. install operator OpenShift Serverless
2. Upon installation wait for `Serverless` navigation section to appear in the admin nav

Actual results:
Serverless section sometimes contains 1, 2, or 3 nav links. First observed only containing a single link named `Revisions`.


Expected results:
Serverless section should always contain 3 nav links: Revisions, Routes, Services


Additional info:

Comment 2 bpeterse 2020-05-18 15:26:45 UTC
*** Bug 1832706 has been marked as a duplicate of this bug. ***

Comment 3 bpeterse 2020-05-26 14:09:14 UTC
Pushing this to 4.6. Its not new, and we don't have time to address in 4.5.

Comment 4 Cyril 2020-06-04 19:25:56 UTC
@Ben,

I'm unable to look into this bug at this time due to my upcoming leave. I want to reassessing to you so you could assign it to someone else to avoid delay.

Comment 5 Samuel Padgett 2020-06-16 19:37:30 UTC
I think we can implement this in the backend now and make watch work for all users. We can use the console service account to watch CRDs, but only return the group/version/kind to the client. This wouldn't leak any information not already available through API discovery. Then the UI should be able to respond immediately on changes, and we avoid the race we have today.

Comment 22 Jakub Hadvig 2021-09-06 10:12:26 UTC
This looks similar to https://bugzilla.redhat.com/show_bug.cgi?id=1997269 issue.
Jon could you please take a look if the above mentioned BZ is not a dup.?
Thanks

Comment 23 Jon Jackson 2021-09-23 13:25:52 UTC
@

Comment 24 Jon Jackson 2021-09-23 13:29:35 UTC
Jakub, this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1997269 but not quite a duplicate. I think that we can address these separately.

Comment 25 Jon Jackson 2021-11-15 17:04:50 UTC
Manually moving to modified since the associated PR merged.

Comment 27 Yadan Pei 2021-11-16 08:34:19 UTC
1. Install 'Red Hat OpenShift Serverless' operator

$ oc get csv -n knative-serving
NAME                          DISPLAY                        VERSION   REPLACES                      PHASE
serverless-operator.v1.18.0   Red Hat OpenShift Serverless   1.18.0    serverless-operator.v1.17.0   Succeeded

$ oc get crd | grep knative | awk -F ' ' '{print $1}' 
knativeeventings.operator.knative.dev
knativekafkas.operator.serverless.openshift.io
knativeservings.operator.knative.dev

2. Create 'Knative Serving' instance in 'knative-serving' namespace, wait until `Serverless` navigation section to appear in the admin nav, I can always see 3 nav links: Revisions, Routes, Services


^^ is checked against 4.10.0-0.nightly-2021-11-15-034648 


However on a 4.9 nightly(4.9.0-0.nightly-2021-11-12-222121) cluster without the fix code, I can still always see 3 nav links: Revisions, Routes, Services, I didn't reproduce the issue described 

Anything I'm missing regards to how can I reproduce the issue?

Comment 28 Yadan Pei 2021-11-29 06:50:28 UTC
Didn't get response yet, based on comment 27 will move it to VERIFIED

any problems or issues we can go back to this BZ

Comment 34 errata-xmlrpc 2022-03-12 04:34:40 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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/RHSA-2022:0056


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