Bug 1821407

Summary: OperatorHub: operator installation may begin in an invalid state
Product: OpenShift Container Platform Reporter: bpeterse
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, jokerman, yanpzhan, yapei
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Its not clear to user which installation mode is supported by the operator group. Consequence: When user tries to install into unsupported namespace, since the form cant be submitted. Fix: Add alert for supported operator's install mode. Result: Alert that will clarify why the picked namespace can be used fo install operator.
Story Points: ---
Clone Of:
: 1821410 (view as bug list) Environment:
Last Closed: 2020-07-13 17:25:34 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: 1821410    

Description bpeterse 2020-04-06 18:51:38 UTC
Description of problem:

On OperatorHub:
- https://<cluster>/operatorhub/subscribe?pkg=<package>

Sometimes the Create Operator Subscription (Install) form for an operator is generated in a seemingly invalid state. There is no way to install this operator due to "specific namespace" being invalid but the "all namespace" option being unavailable.


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


How reproducible:
- always


Steps to Reproduce:
1. Navigate to OperatorHub
2. Choose an operator such as Chruncy PostgreSQL for OpenShift 
3. Click "Install"

Actual results:

- The Create Operator Subscription (Install) form is created, but there is an error banner immediately:
  `Namespace does not support install modes for this Operator`
- The Install Mode is set to "A Specific Namespace"
- The "All Namespace" option is unavailable (disabled/grey text)
- The "Subscribe" button is disabled



Expected results:

- The form should be generated in a usable state.
- The available install options should be correctly enabled/disabled.

Additional info:

Comment 1 bpeterse 2020-04-06 19:22:53 UTC
One solution that may make sense, update the error message to:
- "The namespace 'openshift-operators' does not support install modes for this operator.

Another may be to remove 'openshift-operators' from the picker for an operator that is not allowed to be installed globally.

Comment 2 Jakub Hadvig 2020-04-07 07:51:12 UTC
Tried to reproduce on 4.5.0-0.nightly-2020-04-07-005307 cluster with the 
Crunchy PostgreSQL for OpenShift, but without luck.
Check both 4.5 and 4.4 release heads and in both the form is still submittable.

Not sure if there is anything Im missing.

Comment 6 Yadan Pei 2020-04-13 02:56:59 UTC
1. Go to Operator Hub -> Click 'Crunchy PostgreSQL for OpenShift' -> Click 'Install' -> In the subscription modal, 'All namespaces on the cluster(default) This mode is not supported by this Operator' is disabled,  other settings are set and Subscribe button is enabled without errors

2. Go to Operator Hub -> Click 'OpenShift Pipelines Operator' -> Click 'Install' -> In the subscription modal, 'A specific namespace on the cluster' is disabled and other settings are set correctly without errors, Subscribe button is enabled

I think operator subscription are in correct begin state, moving to VERIFIED


4.5.0-0.nightly-2020-04-12-180647

Comment 7 Yadan Pei 2020-04-13 03:07:05 UTC
When operator only supports `A specific namespace on the cluster`, if user selects a namespace that don't support single namespace installation mode, it will show error message(below) and Subscribe button will be disabled:


Namespace does not support installation mode
The operator group in the openshift-operators namespace does not support the single namespace installation mode.

Comment 8 errata-xmlrpc 2020-07-13 17:25:34 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-2020:2409