Bug 2193109

Summary: Name req validation fail to check start symbol
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Daniel Osypenko <dosypenk>
Component: management-consoleAssignee: Ivo Almeida <ialmeida>
Status: VERIFIED --- QA Contact: Daniel Osypenko <dosypenk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.13CC: odf-bz-bot, skatiyar, tdesala
Target Milestone: ---   
Target Release: ODF 4.14.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.14.0-110 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Daniel Osypenko 2023-05-04 11:08:06 UTC
Created attachment 1962187 [details]
test_failed_screenshot

Description of problem (please be detailed as possible and provide log
snippests):

Name req validation fail to check start-end symbol. 
When entering punctuation symbols like !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ or capital letter in the beginning of the name validation check fails to determine that rule "Starts and ends with a lowercase letter or number" has been violated.

The bug reproduced for OBC, Backing store, Blocking pool, Namespace store, Bucket class.

The bug cannot be reproduced when forbidden symbol taking place in the end of the input.

Same time 'Only lowercase letters, numbers, non-consecutive periods, or hyphens' rule check works well

Version of all relevant components (if applicable):
OC version:
Client Version: 4.12.0-202208031327
Kustomize Version: v4.5.4
Server Version: 4.13.0-0.nightly-2023-04-29-073308
Kubernetes Version: v1.26.3+b404935

OCS verison:
ocs-operator.v4.13.0-179.stable              OpenShift Container Storage   4.13.0-179.stable              Succeeded

Cluster version
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.13.0-0.nightly-2023-04-29-073308   True        False         2d23h   Cluster version is 4.13.0-0.nightly-2023-04-29-073308

Rook version:
rook: v4.13.0-0.8f51fa4563d28d1fbc2a4de72b6aa3b2f1ddd7fd

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
no

Is there any workaround available to the best of your knowledge?
-

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
every time

Can this issue reproduce from the UI?
yes

If this is a regression, please provide more details to justify this:
new feature, not a regression

Steps to Reproduce:
1. login to management console
2. navigate to a page of creation of any resource [OBC, Backing store, Blocking pool, Namespace store, Bucket class]
3. click create resource and write an input such as "{abcdefg" or any valid input name but with uppercase letter or punctuation symbol as a first symbol


Actual results:
'Starts and ends with a lowercase letter or number' - success status
'Only lowercase letters, numbers, non-consecutive periods, or hyphens' - error status


Expected results:
'Starts and ends with a lowercase letter or number' - error status
'Only lowercase letters, numbers, non-consecutive periods, or hyphens' - error status

Additional info:

Comment 7 Daniel Osypenko 2023-08-17 08:10:27 UTC
fixed, test run: http://pastebin.test.redhat.com/1107606