Bug 1694571

Summary: Got unexpected msg when create etcd-operator in singlenamespace in OperatorHub
Product: OpenShift Container Platform Reporter: ge liu <geliu>
Component: Management ConsoleAssignee: Alec Merdler <amerdler>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, jokerman, mmccomas, spadgett
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-23 02:18:09 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:

Description ge liu 2019-04-01 07:03:18 UTC
Description of problem:

Setup ocp 4.0 cluster, login web console, and navigate to 'Operator Hub', select etcd-operator, in page "Create Operator Subscription", check 'singlenamespace-alpha' option in 'Update Channel' and check 'A specific namespace on the cluster' in 'Installation Mode', select a customer's namespace, such as:'ocp-test-boss', Currently, the button 'Subscribe' is blue and could be clicked, click 'Subscribe', the operation will succeed, the etcd-operator will be created successfull in the specified namespace. but if you haven't clicked the button 'Subscribe' right now, and after 5-10 seconds, the web page prompt msg: "Namespace does not support install modes for this Operator." and button 'Subscribe' will be grey.


Cluster version is 4.0.0-0.nightly-2019-03-28-030453
console commit: 7cddd5b3b4f1ba6b4f4e17993f6f00ed6b17dcbc

How reproducible:
Always

Steps to Reproduce:
As description
Actual results:
As title.
Expected results:
There is not unexpected msg prompts.

Comment 1 Alec Merdler 2019-04-16 19:15:37 UTC
Confirmed this behavior, due to incorrect logic when checking the `targetNamespace` (https://github.com/openshift/console/blob/master/frontend/public/components/operator-hub/operator-hub-subscribe.tsx#L33)

Comment 2 Alec Merdler 2019-04-17 17:32:00 UTC
https://github.com/openshift/console/pull/1447

Comment 4 ge liu 2019-04-23 02:12:17 UTC
Verified in 4.1.0-0.nightly-2019-04-22-192604