Bug 2150752 - ocs_advanced_usage metric is 0 even when storageclass/PV encryption is enabled
Summary: ocs_advanced_usage metric is 0 even when storageclass/PV encryption is enabled
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: ocs-operator
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ODF 4.14.0
Assignee: umanga
QA Contact: Shay Rozen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-05 08:36 UTC by Rachael
Modified: 2023-08-09 17:00 UTC (History)
5 users (show)

Fixed In Version: 4.13.0-181
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Rachael 2022-12-05 08:36:29 UTC
Description of problem (please be detailed as possible and provide log
snippets):

When storageclass or PV encryption is enabled on a cluster post deployment, the ocs_advanced_feature_usage_metric does not update it's value to 1. It does not detect the use of PV encryption, unless it is enabled during deployment.


The following logs were observed in the ocs-metrics-exporter pod:

W1205 08:27:51.092918       1 reflector.go:324] /remote-source/app/metrics/internal/collectors/cluster-advance-feature-use.go:166: failed to list *v1.StorageClass: forbidden: User "system:serviceaccount:openshift-storage:ocs-metrics-exporter" cannot get path "/storageclasses"
E1205 08:27:51.092960       1 reflector.go:138] /remote-source/app/metrics/internal/collectors/cluster-advance-feature-use.go:166: Failed to watch *v1.StorageClass: failed to list *v1.StorageClass: forbidden: User "system:serviceaccount:openshift-storage:ocs-metrics-exporter" cannot get path "/storageclasses"


Version of all relevant components (if applicable):
---------------------------------------------------
OCP: 4.12.0-0.nightly-2022-12-04-160656
ODF: odf-operator.v4.12.0-122.stable


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?
N/A


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

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

Steps to Reproduce:
-------------------
1. Deploy an ODF 4.12 cluster without enabling encryption during deployment
2. After deployment, create an encryption enabled storageclass
3. Check the ocs_advanced_feature_usage metric from the UI by navigating to Observe -> Metrics
4. Check the Value parameter


Actual results:
---------------
The Value is 0


Expected results:
-----------------
Since, PV encryption is an advanced feature, the value should be 1

Comment 10 arun kumar mohan 2023-04-21 13:28:16 UTC
We already had this PR: https://github.com/red-hat-storage/ocs-operator/pull/1826 , which was supposed to fix the issue.
As StorageClass is a cluster wide resource (and not a namespace constrained resource), may have to take a different approach.
Taking a look

Comment 11 arun kumar mohan 2023-04-27 17:04:37 UTC
Umanga has created a PR for this: https://github.com/red-hat-storage/ocs-operator/pull/2032
This is now backported to 4.13 branch as well: https://github.com/red-hat-storage/ocs-operator/pull/2033

Comment 17 Shay Rozen 2023-05-30 08:35:49 UTC
Added an encrypted storageclass checked the metric and it still 0. Moving to assigned.

Comment 18 Mudit Agarwal 2023-05-30 10:58:24 UTC
Not a blocker for 4.13


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