Created attachment 1722728 [details] 1_StorageCluster_creating.png Description of problem: It's noticed the inline alert mentioning that an operand instance was needed was still appearing after creating an instance of that operand in the installing flow. Version-Release number of selected component (if applicable): OCP 4.6 How reproducible: 100% with OCS Operator (in a custom CatalogSource, see details below) Steps to Reproduce: 1. Install a custom CatalogSource with OCS Operator included "init-CR" annotation. -- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: tonywu-catsrc namespace: openshift-marketplace spec: displayName: TW's CatalogSource sourceType: grpc image: quay.io/tlwu2013/tw-index:latest 2. Go to "OperatorHub" page and install OCS Operator from "TW's CatalogSource" Provider Type 3. Wait until Operator installed succeeded, click the button to create "StorageCluster" CR 4. Go to "Installed Operators" page, and click "OCS Operator" to go to Operator details page Actual results: The inline alert mentioning that an operand instance was needed was still appearing after creating an instance of that operand in the installing flow. Expected results: The inline alert mentioning that an operand instance was needed should be dismissed after creating an instance of that operand. Additional info: See screenshots in the attachment for reference.
Created attachment 1722729 [details] 2_Operator-details_page_still_shows_StorageCluster_CR_is_required_and_to-be-created.png
In the case that the operand fails to be created for some reason, it would be good if we could also alert the user using the same inline alert paradigm, but with the error styling. Shown in image 3_operand_failed Also of note is that the inline alert appears above the tabs (instead of in Details) which would be preferred for both the warning and this error so it's always visible, vs today it is located in the Details tab.
Created attachment 1722934 [details] UX design showing inline alert when operand fails to be created
Won't work on this until next week which will be next sprint.
Ok, so this works fine with the Portworx operator with CR. It does not work with the OCS CR example because the initialization-resource (from the annotation) has no namespace defined and we need the namespace to determine where to look for the resource. "operatorframework.io/initialization-resource": "\n{\n \"apiVersion\": \"ocs.openshift.io/v1\",\n \"kind\": \"StorageCluster\",\n \"metadata\": {\n \"name\": \"example-storagecluster\"\n },\n \"spec\": {\n \"manageNodes\": false,\n \"monPVCTemplate\": {\n \"spec\": {\n \"accessModes\": [\n \"ReadWriteOnce\"\n ],\n \"resources\": {\n \"requests\": {\n \"storage\": \"10Gi\"\n }\n },\n \"storageClassName\": \"gp2\"\n }\n },\n \"storageDeviceSets\": [\n {\n \"count\": 3,\n \"d The namespace is defined in the alm-example, but that is not what we decided to trigger all this logic off of originally. "alm-examples": "\n[\n {\n \"apiVersion\": \"ocs.openshift.io/v1\",\n \"kind\": \"StorageCluster\",\n \"metadata\": {\n \"name\": \"example-storagecluster\",\n \"namespace\": \"openshift-storage\"\n },\n \"spec\": {\n So this is working as designed. We agreed that the namespace would come from the initialization-resource because that is what defines that we need this CR in the first place (having the initialization-resource in the annotation is what triggers the alert). So, I suggest the OCS operator is wrong. @tony.wu
The Portworx's init-CR template doesn't include `metadata.namespace` either and that field has never been agreed as a "required" field. Hence your reasoning for the cause of this bug is invalid.
Created attachment 1724428 [details] portworx init-CR: StorageCluster template without metadata.namespace
Verification steps 1. Install a custom CatalogSource with OCS Operator included "init-CR" annotation. -- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: tonywu-catsrc namespace: openshift-marketplace spec: displayName: TW's CatalogSource sourceType: grpc image: quay.io/tlwu2013/tw-index:latest 2. Go to "OperatorHub" page and install `OpenShift Container Storage` Operator from "TW's CatalogSource" Provider Type 3. Wait until Operator installed succeeded, click the button 'Create StorageCluster' to create "StorageCluster" CR, wait until "StorageCluster" CR is created 4. Go to "Installed Operators" page, and click "OpenShift Container Storage Operator" to go to Operator details page, the inline alert mentioning that an operand instance was needed isn't shown any more Verified on 4.7.0-0.ci-2020-11-03-041130
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.7.0 security, bug fix, and enhancement 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-2020:5633