Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1709964

Summary: Missing button to create Cluster Logging CR after initial install of Cluster Logging operator
Product: OpenShift Container Platform Reporter: Mike Fiedler <mifiedle>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: amerdler, aos-bugs, jokerman, mmccomas, spadgett, sponnaga, yapei
Target Milestone: ---   
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: 4.1.3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Preivously in some cases you would see a whitescreen with no error in the web console if trying to create an operator resource immediately after installing an operator through Operator Hub. We now show a clear message in the console if trying to create a resource before it is available.
Story Points: ---
Clone Of:
: 1710079 (view as bug list) Environment:
Last Closed: 2019-06-26 08:50:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1710079    
Attachments:
Description Flags
CRDisNotDiscovered
none
Normal none

Description Mike Fiedler 2019-05-14 16:19:37 UTC
Description of problem:

Not sure if this is OLM, Logging or Console.   Please help route.

I can reproduce this reliably on a fresh install - see steps below.   After installing the Cluster Logging operator, going to Installed Operators -> Cluster Logging and clicking the Cluster Logging CR "tab", the page presented is blank.  It should have the button to create a Cluster Logging resource.

Reloading the page causes the button to appear, and subsequent repeats of that navigation also show the button.   

Browser is Chrome 72.0.3622.0

Version-Release number of selected component (if applicable): Cluster version is 4.1.0-0.nightly-2019-05-09-204138


How reproducible: Always on a clean install


Steps to Reproduce:
1.  Install default OOTB AWS IPI cluster
2.  Install Elasticsearch operator (probably unnecessary, but I did)
3.  oc adm new-project openshift-logging --node-selector=""
4.  oc label namespace openshift-logging openshift.io/cluster-logging=true openshift.io/cluster-monitoring=true
5.  From the console, install the Cluster Logging operator into the openshift-logging namespace.  Wait for the operator to be Running
6.  Navigate Installed Operators -> Cluster Logging and click Cluster Logging tab

Actual results:

No button to create Cluster Logging CR.   JS console shows this series of errors repeated twice:

resource.js:27 No model registered for logging.openshift.io~v1~ClusterLogging
(anonymous) @ resource.js:27
t.start @ resource.js:27
t.UNSAFE_componentWillMount @ resource.js:27
mountClassInstance @ react-dom.production.min.js:13
beginWork @ react-dom.production.min.js:13
o @ react-dom.production.min.js:13
a @ react-dom.production.min.js:13
x @ react-dom.production.min.js:13
_ @ react-dom.production.min.js:13
b @ react-dom.production.min.js:13
interactiveUpdates @ react-dom.production.min.js:13
_n @ react-dom.production.min.js:13
resource.js:27 kindObj: no model for kind logging.openshift.io~v1~ClusterLogging
l @ resource.js:27
(anonymous) @ resource.js:27
beginWork @ react-dom.production.min.js:13
o @ react-dom.production.min.js:13
a @ react-dom.production.min.js:13
x @ react-dom.production.min.js:13
_ @ react-dom.production.min.js:13
b @ react-dom.production.min.js:13
interactiveUpdates @ react-dom.production.min.js:13
_n @ react-dom.production.min.js:13
resource.js:27 kindObj: no model for kind logging.openshift.io~v1~ClusterLogging
l @ resource.js:27
(anonymous) @ resource.js:27
t @ resource.js:27
constructClassInstance @ react-dom.production.min.js:13
beginWork @ react-dom.production.min.js:13
o @ react-dom.production.min.js:13
a @ react-dom.production.min.js:13
x @ react-dom.production.min.js:13
_ @ react-dom.production.min.js:13
b @ react-dom.production.min.js:13
interactiveUpdates @ react-dom.production.min.js:13
_n @ react-dom.production.min.js:13
resource.js:27 No model registered for logging.openshift.io~v1~ClusterLogging
(anonymous) @ resource.js:27
t.start @ resource.js:27
t.UNSAFE_componentWillMount @ resource.js:27
mountClassInstance @ react-dom.production.min.js:13
beginWork @ react-dom.production.min.js:13
o @ react-dom.production.min.js:13
a @ react-dom.production.min.js:13
x @ react-dom.production.min.js:13
_ @ react-dom.production.min.js:13
b @ react-dom.production.min.js:13
interactiveUpdates @ react-dom.production.min.js:13
_n @ react-dom.production.min.js:13



Expected results:

Blue button to create cluster logging CR


Additional info:

Comment 1 Alec Merdler 2019-05-14 18:35:57 UTC
How reliably can this be reproduced? The error `No model registered for logging.openshift.io~v1~ClusterLogging` indicates that the console's API discovery failed to register the CRD. This could be a race condition since reloading the page fixes the issue.

Comment 3 Mike Fiedler 2019-05-15 01:46:46 UTC
re: comment 1.   It seems to be 100% reproducible on initial install of the cluster logging operator.  I am 6/6 right now.

Comment 4 Samuel Padgett 2019-05-15 02:20:35 UTC
(In reply to Alec Merdler from comment #1)
> How reliably can this be reproduced? The error `No model registered for
> logging.openshift.io~v1~ClusterLogging` indicates that the console's API
> discovery failed to register the CRD. This could be a race condition since
> reloading the page fixes the issue.

Sounds right. We're either not re-running API discovery or we're racing. The message is from Firehose here:

  https://github.com/openshift/console/blob/release-4.1/frontend/public/components/utils/firehose.jsx#L145

Mike, were you logged in as kube:admin? Did the page go totally white, or just a 404 message?

We should show a message saying, `The server doesn't have a resource type ${missingType}. Try refreshing the page if it was recently added.`

  https://github.com/openshift/console/blob/release-4.1/frontend/public/components/resource-list.tsx#L33

If the browser white-screened, that means we had an uncaught JS error somewhere, though.

Comment 5 Mike Fiedler 2019-05-15 11:17:52 UTC
re:  comment 4

>  Mike, were you logged in as kube:admin? Did the page go totally white, or just a 404 message?

I've seen it as kube:admin and a provisioned user with cluster-admin.   Cluster logging can't be installed by a regular user.   The page went totally white - no 404 and no error msg.

Comment 7 Samuel Padgett 2019-05-22 19:15:32 UTC
I wasn't able to reproduce, but I did get a stack trace by manually deleting the CRD. I think we are racing here.

inject.js:32 kindObj: no model for kind logging.openshift.io~v1~ClusterLogging
kindObj	@	inject.js:32
(anonymous)	@	list-page.jsx:311


inject.js:32 kindObj: no model for kind logging.openshift.io~v1~ClusterLogging
kindObj	@	inject.js:32
(anonymous)	@	list-page.jsx:134
ConnectedFireMan	@	list-page.jsx:134

firehose.jsx:162 No model registered for logging.openshift.io~v1~ClusterLogging
(anonymous)	@	firehose.jsx:162
push../public/components/utils/firehose.jsx.Firehose.start	@	firehose.jsx:159
push../public/components/utils/firehose.jsx.Firehose.UNSAFE_componentWillMount	@	firehose.jsx:123

Looks like an error boundary is swallowing the original error.

Comment 8 Samuel Padgett 2019-05-22 19:42:26 UTC
This PR adds an error message instead of just having a white screen:

https://github.com/openshift/console/pull/1602

Comment 9 Samuel Padgett 2019-05-23 12:32:59 UTC
4.1.z backport: https://github.com/openshift/console/pull/1604

Comment 11 Yadan Pei 2019-06-21 02:54:55 UTC
When CRD/clusterloggings.logging.openshift.io is not discovered, we show a 404 error page with message "The server doesn't have a resource type ClusterLogging. Try refreshing the page if it was recently added."


Verified on 4.1.0-0.nightly-2019-06-20-015058

Comment 12 Yadan Pei 2019-06-21 02:55:18 UTC
Created attachment 1582981 [details]
CRDisNotDiscovered

Comment 13 Yadan Pei 2019-06-21 02:55:43 UTC
Created attachment 1582982 [details]
Normal

Comment 15 errata-xmlrpc 2019-06-26 08:50:22 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:1589