Bug 2023653 - Namespace store,backing store and bucket class creation proceeds even when required fields are empty .
Summary: Namespace store,backing store and bucket class creation proceeds even when re...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: Multi-Cloud Object Gateway
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ODF 4.10.0
Assignee: Kfir Payne
QA Contact: Mugdha Soni
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-16 09:51 UTC by Mugdha Soni
Modified: 2023-08-09 16:49 UTC (History)
14 users (show)

Fixed In Version: 4.10.0-177
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-21 09:12:42 UTC
Embargoed:


Attachments (Terms of Use)
Create button enabled (39.43 KB, image/png)
2021-11-16 09:51 UTC, Mugdha Soni
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github noobaa noobaa-operator pull 806 0 None Merged Add admission validation webhook server 2022-03-02 14:36:36 UTC
Github noobaa noobaa-operator pull 821 0 None Merged Add Bucketclass admission validations 2022-03-02 14:36:37 UTC
Github noobaa noobaa-operator pull 867 0 None Merged Add empty target bucket admission validation 2022-03-02 14:36:37 UTC
Github noobaa noobaa-operator pull 868 0 None Merged Backport to 5.10: add empty target bucket admission validation 2022-03-02 16:35:13 UTC

Description Mugdha Soni 2021-11-16 09:51:05 UTC
Created attachment 1841993 [details]
Create button enabled

Description of problem:
-------------------------
When user tried to create Namespace store ,bucket class and backing store via UI and the required fields don't have an input , user is able to proceed ahead as "create " button is enabled and an error is encountered after the user clicks on create button (screenshot for same is attached ) 


Version-Release number of selected component:
------------------------------------------------

OCP : 4.9.0-0.nightly-2021-11-12-222121
ODF : 4.9.0-237.ci

How reproducible:
--------------------
Every time


Steps to Reproduce:
---------------------
1. After the OCP cluster creation install ODF operator .
2. Create storage system .
3. Direct to storage--> ODF --> backing store and click in create backing store.
4. Leave one of the required fields empty and click on create.

Actual results:
---------------------
(1) Create button is enabled .

(2) When click on create button , redirects to the next page and an error is encountered which says " Oops, something went wrong ".

(3)When directed to storage --> ODF --> backing store , the BS created in previous step is present in dashboard but the status mentioned is "Rejected".


Expected results:
-----------------------
The create button should be either disabled or user should not be directed to the next page .

Additional info:
---------------------
Same is encountered with namespace store and bucket class.

Comment 4 afrahman 2021-11-19 10:04:50 UTC
*** Bug 2024547 has been marked as a duplicate of this bug. ***

Comment 5 Bipul Adhikari 2021-11-23 06:03:01 UTC
We expect the validation to come from the Operator. There is already a validation framework setup this needs to be leveraged.

Comment 8 Mudit Agarwal 2021-12-01 12:18:07 UTC
Not a 4.9 blocker

Comment 9 Bipul Adhikari 2021-12-02 04:43:29 UTC
Operator needs to check whether the requested Object(CR) has enough information to proceed with CR creation. 
Something like an admission controller(https://kubernetes.io/blog/2019/03/21/a-guide-to-kubernetes-admission-controllers/)
If this is done then UI can just propagate the error sent by the API to the user.

Comment 11 Bipul Adhikari 2021-12-02 08:32:44 UTC
We always propagate the errors sent by the API. We have been doing this for all resources. Moving it to MCG.

Comment 18 Mugdha Soni 2022-02-28 10:33:12 UTC
HI

Validated the fix with following builds:-

OCP : 4.10.0-0.nightly-2022-02-26-230022
ODF : 4.10.0-169

**Observations :

(a) For namespace store , even when all the required fields are not filled with user input, the user can still click on create button and it starts the creation . Later the status is shown as "creating' for long.

(b) The Bucket class is fixed.

(c) For Backing store again the creation is proceeded even if input for all required fields are not present .

Screenshots are present here 'https://docs.google.com/document/d/1ET2NGIeedSg-g06EeMt3_txdkatC3ZDJ74TO5epoIuU/edit?usp=sharing'

Since the fix is only available for Bucket class , re-assigning the bug .

Thanks 
Mugdha

Comment 23 Mugdha Soni 2022-03-22 07:21:34 UTC
Retested the fix with following versions :

OCP:- 4.10.0-0.nightly-2022-03-19-230512

ODF :- 4.10.0-198

When the target bucket was left empty and create button was clicked there was an error message displayed "admission webhook "admissionwebhook.noobaa.io" denied the request: Failed creating the Backingstore, please provide target bucket" and creation was not successful.

Screenshot for same is attached in comment#21 and comment#22 . 
Moving the bug to verified state .


Thanks and Regards
Mugdha Soni


Note You need to log in before you can comment on or make changes to this bug.