Bug 2168840 - [Fusion-aaS][ODF 4.13]Within 'prometheus-ceph-rules' the namespace for 'rook-ceph-mgr' jobs should be configurable.
Summary: [Fusion-aaS][ODF 4.13]Within 'prometheus-ceph-rules' the namespace for 'rook-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: ceph-monitoring
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ODF 4.13.0
Assignee: arun kumar mohan
QA Contact: Jilju Joy
URL:
Whiteboard:
Depends On:
Blocks: 2179235
TreeView+ depends on / blocked
 
Reported: 2023-02-10 07:56 UTC by Nitin Goyal
Modified: 2023-08-09 16:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Namespace 'openshift-storage' was hardcoded in the source. Consequence: when deployed under a different namespace (other than 'openshift-storage') prometheus alert-queries still has the hardcoded 'openshift-storage' value in it, thus providing a wrong result. Fix: while deploying ocs-operator, we try to edit/change the hardcored 'openshift-storage' namespace value in the 'prometheus-ceph-rules' alert file with the current namespace. Result: when ODF cluster is deployed in a different namespace, we should not see any reference to 'openshift-storage' in any of the prometheus-ceph alert queries
Clone Of:
: 2179235 (view as bug list)
Environment:
Last Closed: 2023-06-21 15:23:59 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage ocs-operator pull 2004 0 None open Added 'namespace' tag to queries 2023-04-13 09:07:57 UTC
Github red-hat-storage ocs-operator pull 2008 0 None open Change any embedded namespace to current one 2023-04-13 09:07:57 UTC
Github red-hat-storage ocs-operator pull 2016 0 None open Bug 2168840:[release-4.13] Change any embedded namespace to current one 2023-04-18 13:38:23 UTC
Github red-hat-storage ocs-operator pull 2017 0 None open Bug 2168840:[release-4.13] Added 'namespace' tag to queries 2023-04-18 15:23:57 UTC
Red Hat Product Errata RHBA-2023:3742 0 None None None 2023-06-21 15:24:51 UTC

Description Nitin Goyal 2023-02-10 07:56:13 UTC
Description of problem (please be detailed as possible and provide log
snippets):

The namespace openshift-storage is hardcoded for rook-ceph-mgr jobs under the prometheus-ceph-rules. This will only search for jobs in the openshift-storage namespace. We wanted to make this name configurable for Rosa because MS will not be using openshift-storage namespace anymore. It should be the namespace of storagecluster.


Version of all relevant components (if applicable):


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


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


Can this issue reproducible?


Can this issue reproduce from the UI?


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


Steps to Reproduce:
1.
2.
3.


Actual results:


Expected results:


Additional info:

link to the rule: https://github.com/red-hat-storage/ocs-operator/blob/83103d3b3f0bfbdd7446db1f7230de0e15ebbe02/controllers/storagecluster/prometheus/localcephrules.yaml#L45

Comment 6 arun kumar mohan 2023-03-20 09:44:55 UTC
Thanks Sunil.
As a general comment, this feature is something where we need to change (almost) all the alert queries (to raise the alert for all the namespaces of 'rook-ceph-mgr' jobs are in) and require some testing as well.
Once the feature is in the master OCS-Operator branch then we can target which releases of 4.13 and 4.12 to be backported.

Comment 7 arun kumar mohan 2023-04-05 08:05:58 UTC
Devel ack-ing this, but I am unable to change devel_ack flag

Comment 8 arun kumar mohan 2023-04-12 08:18:23 UTC
Added a PR for the query changes: https://github.com/red-hat-storage/ocs-operator/pull/2004

Comment 9 arun kumar mohan 2023-04-13 09:07:58 UTC
One more PR added to remove any embedded 'namespace' in the YAML file: https://github.com/red-hat-storage/ocs-operator/pull/2008

Comment 18 arun kumar mohan 2023-05-03 10:29:18 UTC
About testing,

Check for resource named prometheus-ceph-rule under 'prometheusrules' kind
`oc get prometheusrules prometheus-ceph-rules -o yaml`
When/if storagesystem is deployed under a different namespace (other than 'openshift-storage'), we should not see any hardcoded name 'openshift-storage' in this yaml output/file.

If StorageSystem is deployed under namespace 'openshift-storage', we will still see the name 'openshift-storage' in the rules.

Comment 22 errata-xmlrpc 2023-06-21 15:23:59 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


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