Bug 2109140

Summary: OBC and OB option showing twice to user of a Project on Console
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: avdhoot <asagare>
Component: management-consoleAssignee: Sanjal Katiyar <skatiyar>
Status: CLOSED CURRENTRELEASE QA Contact: avdhoot <asagare>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.11CC: badhikar, hnallurv, jefbrown, muagarwa, musoni, nthomas, ocs-bugs, odf-bz-bot, skatiyar
Target Milestone: ---Flags: skatiyar: needinfo-
skatiyar: needinfo-
Target Release: ODF 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.12.0-74 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-08 14:06:28 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:
Attachments:
Description Flags
OBC none

Description avdhoot 2022-07-20 13:55:50 UTC
Created attachment 1898291 [details]
OBC

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

The Object Bucket Claim and Object bucket showing duplicate entries in storage menu.

Please check attachment for more info.

Version of all relevant components (if applicable):
OCP- 4.11
ODF- 4.11

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

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


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:


Steps to Reproduce:
1.Create a user by using htpasswd method from console and a project
2.Login using created User
3.Go to storage Menu and verify.



Actual results:
Object Bucket Claim and Object bucket showing twice.

Expected results:
Object Bucket Claim and Object bucket should show only ones

Additional info:

Comment 2 Sanjal Katiyar 2022-07-21 09:21:55 UTC
reported on:
OCP 4.11.0-0.nightly-2022-07-19-104004
ODF 4.11.0-119

Comment 3 Sanjal Katiyar 2022-08-02 14:23:46 UTC
From 4.11 onwards we have migrated our code from older OCP repo to a new ODF repo. We disable/hide older code and enable a new one based on certain flags which UI reads from the ODF operator's CSV.
For non-privileged user (created from htpasswd method), he doesn't has an access to read the CSV, hence flags are never getting set and both older and new UI can be seen (two OB/OBC options, one from old repo another from new).

1) This bug will only be visible to non-privileged user and for normal kubeadmin user it will work fine and as expected.
2) Other than above mentioned steps for reproduction, there are few more steps that the non-privileged user will have to do in other to face this bug.
(that is, adding a RoleBinding for allowing the non-privileged user to be able to see OB/OBC pages at all, basically https://bugzilla.redhat.com/show_bug.cgi?id=2031705)
3) This is not a blocker, even though multiple tabs are present, existing OB/OBC functionality will not break.

That's said, we are in ODF 4.12 phase, do we want to backport this bug to previous 4.11 release as well ? or is it alright to have it fixed in ODF 4.12 only ?
cc @badhikar @muagarwa ?

Comment 4 Nishanth Thomas 2022-08-02 15:27:14 UTC
Doesn't require a back port

Comment 5 avdhoot 2022-08-09 07:01:10 UTC
Hi Sanjal,

I am not compltely agree with statement number 2. Because before adding RoleBinding, non-privileged user is able to see OB/OBC pages just that they unable to create OB/OBC.

Comment 6 Sanjal Katiyar 2022-09-07 13:03:25 UTC
(In reply to avdhoot from comment #5)
> Hi Sanjal,
> 
> I am not compltely agree with statement number 2. Because before adding
> RoleBinding, non-privileged user is able to see OB/OBC pages just that they
> unable to create OB/OBC.

User needs read access to noobaa CR then only OB/OBC tabs will be visible on the UI, if u r seeing tabs without adding Rolebinding maybe ur user somehow has read access to noobaa CR. I have tried and verified is multiple times, but I guess that is not the intention of this BZ as well, in future if need arises (as this behaviour is not exactly looks like a bug to me for now) we can have a discussion around that and sort that out.

Comment 11 avdhoot 2022-10-31 07:40:44 UTC
Cluster Details-

[auth]$ oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.12.0-0.nightly-2022-10-25-210451   True        False         107m    Cluster version is 4.12.0-0.nightly-2022-10-25-210451
[auth]$  oc get csv -n openshift-storage 
NAME                              DISPLAY                       VERSION   REPLACES   PHASE
mcg-operator.v4.12.0              NooBaa Operator               4.12.0               Succeeded
ocs-operator.v4.12.0              OpenShift Container Storage   4.12.0               Succeeded
odf-csi-addons-operator.v4.12.0   CSI Addons                    4.12.0               Succeeded
odf-operator.v4.12.0              OpenShift Data Foundation     4.12.0               Succeeded

steps used to verify bug-

1.Create a user by using htpasswd method from console and a project
2.Login using created User.
3.Login using kubeadmin and created rolebinding for new user
4.Go to storage Menu and verify OBC and OB option showing twice to user.

Observation-
OBC and OB option showing ones to user as expected.

Hence Marking this bug as verified.