Bug 2008365 - [ODF Managed Service] Inappropriate error details in invalid notification Mail id error
Summary: [ODF Managed Service] Inappropriate error details in invalid notification Ma...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat OpenShift Container Storage
Classification: Red Hat Storage
Component: odf-managed-service
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Renan Campos
QA Contact: suchita
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-28 04:58 UTC by suchita
Modified: 2023-08-03 08:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
Invalid Notification Email ID error (53.01 KB, image/png)
2021-09-28 04:58 UTC, suchita
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SDA-5162 0 None None None 2021-12-20 11:44:01 UTC

Description suchita 2021-09-28 04:58:08 UTC
Created attachment 1826853 [details]
Invalid Notification Email ID error

Description of problem:
In the RHODF-MS add-on, if the configuration of `Notification email ID` is filled with an invalid email id then it shows the below error in RHODF-MS configuration page. 

"Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-0' is invalid. Must match regexp '(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])'
Operation ID: 69204530-8fbd-4343-a001-f5d9d60fedea"

Here in the above error
 "Danger alert: Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-0' is invalid. " 
looks appropriate. However, the rest error details are inappropriate for the user:
1. Regex is part of code and on the user interface it is not expected
2. On user interface instead of regex, maybe validity criteria in an English statement will look more user friendly
3. Operation ID is not useful info to the user


Version-Release number of selected component (if applicable):
ocs-operator.v4.8.1 
ocs-osd-deployer-qe.v1.1.0
prometheusoperator.0.47.0 
route-monitor-operator.v0.1.357-de47d65


How reproducible:
5/5

Steps to Reproduce:
1. From the OCM UI console, on the ROSA cluster, select the "Red Hat Openshift Manage Service" Add-on.
2. On on add-on detail page click on edit configuration.
3. In RHODFMS add-on configuration, enter invalid notification email id e.g. "ABC"
4. Click on the "Update" button on the configuration page.

Actual results:
Error on page with inappropriate error details:
"Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-0' is invalid. Must match regexp '(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])'
Operation ID: 69204530-8fbd-4343-a001-f5d9d60fedea"


Expected results:
Error on page with user-friendly error details.

Additional info:

Comment 2 suchita 2022-07-13 09:04:47 UTC
In verification Added `abc as mail ID and observed the below error on the consumer addon:

--------------------------------------UI Verification -------------------------------------------
Case1:Invalid mail ID in Notification Email filed
Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-0' is invalid: Invalid email address
Operation ID: 0af952fe-bb84-4d86-87dd-372433d8dd93

Case2: Invalid mail ID in Additional Notification Email 1st field
Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-1' is invalid: Invalid email address
Operation ID: 33fe2ef8-d099-493d-9cd5-e3328f106683

Case3: Invalid mail ID in Additional Notification Email 2nd field
Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-2' is invalid: Invalid email address
Operation ID: a5ba8227-cd09-45a0-be3c-00aff5dbfb95

case4: invalid mail id in more that one notification Email ID fields:

Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-0' is invalid: Invalid email address
Operation ID: 797f0563-24ef-472b-831a-f1f5f6b1c97d

==> error for the first wrong error and not for all wrong mails ids




---------------------------------------------------------------------------------

While verification on Providee added 'abc' in notification mail ID and observed a little bit different error on appliance mode provider addon

-------------------------------------------------------------------
Danger alert: Error adding add-ons
CLUSTERS-MGMT-403: undefined
Operation ID: b6b94211-087c-46b0-9ddd-cb11c4c95002
-------------------------------------------------------------------

Comment 11 suchita 2023-05-08 12:06:42 UTC

Observed below expected error on provider:
 
--------------------------------------------------------------------------------------
Error adding add-ons
CLUSTERS-MGMT-403: Operations on this cluster must go through Managed Service endpoints.
Operation ID: 1f0ac666-00de-4abd-bee0-07ab4bbf3285
--------------------------------------------------------------------------------------

observed expected error on Consumer
--------------------------------------------------------------------------------------
Danger alert:Error adding add-ons
CLUSTERS-MGMT-400: Add-on parameter value for 'notification-email-2' is invalid: Invalid email address
Operation ID: b6294262-0128-4bc8-b797-69c689241abc
--------------------------------------------------------------------------------------
This has already been verified as per comment#2 and again verified in v2.0.12 addon. 
Moving status to verified.


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