Bug 2030839

Summary: Concecutive dashes in OBC name
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: swilson
Component: Multi-Cloud Object GatewayAssignee: Danny <dzaken>
Status: CLOSED ERRATA QA Contact: Mugdha Soni <musoni>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.7CC: dzaken, etamir, kramdoss, mmuench, muagarwa, nbecker, nberry, ocs-bugs, odf-bz-bot, rcyriac
Target Milestone: ---   
Target Release: ODF 4.10.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 4.10.0-79 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2037497 (view as bug list) Environment:
Last Closed: 2022-04-13 18:50:40 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:
Bug Depends On:    
Bug Blocks: 2037497    

Description swilson 2021-12-09 20:39:55 UTC
NooBaa seems to be allowing the provisioning of some buckets with consecutive dashes in the OBC name. The OBC name generates a OB with the same name and a random suffix. From within the NooBaa UI, a bucket cannot be provisioned with consecutive dashes. However, in OCP you can use an OBC name with consecutive dashes and the bucket is provisioned.

Version of all relevant components (if applicable): All


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? Do not provision bucket with consecutive dashes


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?
Yes

Can this issue reproduce from the UI? Yes


If this is a regression, please provide more details to justify this: Unknown


Steps to Reproduce:
1. Provision OBC in OCP UI with consecutive dashes
2. Try to provision bucket with consecutive dashes in NooBaa UI
3. The OBC will provision in OCP
4. The bucket will not be provisioned from within the NooBaa UI


Actual results:
OBCs provisioned in OCP with consecutive dashes.


Expected results:
OBCs not provisioned with consecutive dashes


Additional info:

Comment 3 swilson 2021-12-13 23:46:07 UTC
Update:

Cannot provision bucket with name analytics-data-sync--bucket. Can provision OBC named analytics-data-sync--bucket2

Comment 4 Danny 2022-01-04 11:18:10 UTC
This is a bug in lib-bucket-provisioner. it is not related to consecutive dashes. 
when the prefix length is exactly 27, the prefix is not truncated. as a result, when adding a UUID, the generated bucket name is invalid.
I issued a fix here https://github.com/kube-object-storage/lib-bucket-provisioner/pull/220. once it is merged I will update the dependency in noobaa-operator

Comment 9 Mugdha Soni 2022-02-01 08:51:00 UTC
Hi Danny 

Below i have mentioned the steps to validate the fix . Please correct me if am wrong or if am missing any point.

1. Create an OBC named "analytics-data-sync--bucket", or any other 27-char long str .
2. The OBC should bind, and the last char of the name should be truncated.

Thanks 
Mugdha Soni

Comment 10 Danny 2022-02-02 10:04:52 UTC
Hi Mugdha,

1 is correct. regarding 2, it's not the OBC name that should be truncated, but the prefix of the name of the underlying bucket in noobaa that is truncated. this prefix is based on the OBC name, and AFAIR can be found in the ob spec (not OBC but the ObjectBucket corresponding with the OBC).

Thanks,
Danny

Comment 11 Mugdha Soni 2022-02-02 13:42:07 UTC
Thanks Danny . Will share the inputs by tomorrow EOD .

Comment 16 Mugdha Soni 2022-03-01 06:37:08 UTC
Hi 

After discussion with the assignee and comment#15 moving this bug to verified state .

Thanks 
Mugdha Soni

Comment 18 errata-xmlrpc 2022-04-13 18:50:40 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 (Important: Red Hat OpenShift Data Foundation 4.10.0 enhancement, security & bug fix update), 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/RHSA-2022:1372