Bug 1846894

Summary: [csi-driver-manila-operator] No clear info when creating ManilaDriver instance with un-expected field from webconsole
Product: OpenShift Container Platform Reporter: Wei Duan <wduan>
Component: Management ConsoleAssignee: Robb Hamilton <rhamilto>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: low    
Version: 4.5CC: aos-bugs, jokerman, jsafrane, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The console's YAML editor allows the inclusion of metadata.namespace for all resources. Consequence: Resources that are not namespaced (do not take a metadata.namespace value) produce a generic, unhelpful error message when a namespace is included when creating via the YAML editor. Fix: If a resource is not namespaced, remove the metadata.namespace value from the YAML input when saving. Result: Resources that are not namespaced but have a metadata.namespace value specified have the value removed and create without error. This makes the console's behavior consistent with the CLI.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:06:58 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:

Description Wei Duan 2020-06-15 08:26:02 UTC
Description of problem:
When  choosing "YAML View" as "Configure via" and creating ManilaDriver  instance with un-expected field (namespace: "test"), no clear message shows up. 

Version-Release number of selected component (if applicable):
[wduan@MINT appregistry]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version    4.5.0-0.nightly-2020-06-11-183238   True        False         3h56m    Cluster version is 4.5.0-0.nightly-2020-06-11-183238

How reproducible:
Always

Steps to Reproduce:
0. CSI Driver Manila Operator was installed
1. From webconsole,  Operator - CSI Driver Manila Operator - Create ManilaDriver 
2. choose "YAML View" as "Configure via"
3. add "namespace: test"
4. click "Create" button

Actual results:
Danger alert:An error occurred
Not Found

Expected results:
Should display more clear message, like only <namespace> is supported.

Additional info:

Comment 1 Jan Safranek 2020-07-31 10:22:22 UTC
This looks like Console issue. CRD used by Manila controller is not namespaced and adding 'namespace: test' in YAML view produces "An error occurred Not Found"

BTW, you don't need a cluster on OpenStack / Manila to test this bug, a common AWS cluster will do. The operator won't be able to deploy the CSI driver, but it's done *after* user creates CR for the operator.

Comment 5 Yadan Pei 2020-08-26 09:40:17 UTC
1. Subscribe Manila CSI Driver Operator
2. Create 'Manila Driver' instance, in the YAML view, add "namespace: test" and hit Create button
3. Manila Driver instance will be created and the `namespace: test` will be deleted 

this is behaving in the same way with CLI, so moving to Verified 

    4.6.0-0.nightly-2020-08-24-110601

Comment 7 errata-xmlrpc 2020-10-27 16:06:58 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 (OpenShift Container Platform 4.6 GA Images), 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:4196