Bug 2142894 - Credentials are ignored when creating a Backing/Namespace store after prompted to enter a name for the resource
Summary: Credentials are ignored when creating a Backing/Namespace store after prompte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: management-console
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ODF 4.13.0
Assignee: Ivo Almeida
QA Contact: Sagi Hirshfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-15 12:28 UTC by Sagi Hirshfeld
Modified: 2023-12-08 04:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-21 15:22:18 UTC
Embargoed:
ialmeida: needinfo-
ialmeida: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage odf-console pull 650 0 None Merged Implemented RHF and Yup schema validations on forms 2023-03-20 15:54:05 UTC
Red Hat Product Errata RHBA-2023:3742 0 None None None 2023-06-21 15:22:43 UTC

Description Sagi Hirshfeld 2022-11-15 12:28:22 UTC
Description of problem (please be detailed as possible and provide log
snippests):

On the management console of a an OpenShift 4.12 cluster with ODF 4.12 installed, the relevant form is found through the following steps:

Admin view -> Storage -> Data Foundation -> Backing/Namespace Store -> Create Backing/Namespace Store.

While using this form, if all the fields are filled properly - on the first attempt - then if the credentials are correct and the target bucket exists, the resource is created successfully without any issue.

The issue occurs when failing to fill the form properly on the first attempt. Specifically, when entering Credentials (instead of a Secret) and the field of the name ("BackingStore name" or "Namespace store name") is left empty while trying to create the resource. 
The result is that the resource is stuck at the "Verifying" stage, and that no Secret was actually generated, as shown in the YAML of the Backing/Namespace Store:

status:
  conditions:
    - lastHeartbeatTime: '2022-11-15T11:42:36Z'
      lastTransitionTime: '2022-11-15T11:42:36Z'
      message: >-
        BackingStore Secret "-secret" not found, but not rejecting the young as
        it might be in process
      reason: TemporaryError
      status: 'False'
      type: Available

To clarify:
* creation and usage of Backing/Namespace Stores still works as expected when the all the fields in the form are filled properly on the first attempt. 

* Only leaving the name field empty causes this issue. Trying to input an invalid name (such as "my_backing_store", due to the '_' character) results in the expected creation of the resource (and the Secret).

Version of all relevant components (if applicable):
--OCP 4.12
--OCS 4.12

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?
Yes, standard attempts in creating a Backing/Namespace Store - without forgetting to fill the name field - work as expected.

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, and only from the UI.

If this is a regression, please provide more details to justify this:
Further investigation on older OCP/OCS versions are still required to determine whether or not this is a regression.

Steps to Reproduce:
1. Enter the "Create Backing Store" or "Create Namespace Store" forms through the following steps in the management console:
 
Admin view -> Storage -> Data Foundation -> Backing/Namespace Store -> Create Backing/Namespace Store.

2. Leave the "BackingStore name" or "Namespace Store name" field empty.

3. Fill out the rest of the form:
  3.1 Provider: AWS S3
  3.2 Region: us-east-1
  3.3 Click on "Switch to credentials" and enter a valid Access Key and Secret 
      Key.
  3.4 Target Bucket: Enter the name of an existing S3 bucket in AWS.

4. Click "Create"

5. Notice the error prompt and enter a valid name for the resource (i.e "my- 
   backingstore")

6. Click "Create".

Actual results:
- The Backing/Namespace Store is stuck at the "Verifying" stage.
- No Secret was created.
- The YAML of the Backing/Namespace Store contains the following error message:
  "BackingStore Secret "-secret" not found, but not rejecting the young as        
  it might be in process"


Expected results:
- The Backing/Namespace Store should eventually reach the "Ready" stage if the credentials are correct, and "Rejected" if not.


Additional info:
- Further investigation is required on older versions of OCP/OCS, and on other Providers besides AWS.

Comment 8 Debjyoti Pandit 2023-01-09 15:34:43 UTC
https://github.com/red-hat-storage/odf-console/pull/573

Comment 12 Debjyoti Pandit 2023-03-20 10:11:05 UTC
This bug has been taken care of by the changes made by @ialmeida for his previous epic.

@ialmeida please add your PR link to this BZ.

Comment 13 Sanjal Katiyar 2023-03-21 15:24:49 UTC
It is fixed as part of 4.13 feature development... did not sent any specific PR for bug fixing... since we are past 4.13 feature freeze and PR is already long merged... moving the BZ to MODIFIED...

Comment 22 errata-xmlrpc 2023-06-21 15:22:18 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 (Red Hat OpenShift Data Foundation 4.13.0 enhancement and 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/RHBA-2023:3742

Comment 23 Red Hat Bugzilla 2023-12-08 04:31:21 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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