Bug 2179235

Summary: [Fusion-aaS][4.12.z clone] Within 'prometheus-ceph-rules' the namespace for 'rook-ceph-mgr' jobs should be configurable.
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Nitin Goyal <nigoyal>
Component: ceph-monitoringAssignee: arun kumar mohan <amohan>
Status: CLOSED ERRATA QA Contact: Filip Balák <fbalak>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.12CC: amohan, dkamboj, etamir, fbalak, hnallurv, jijoy, kramdoss, nberry, nthomas, ocs-bugs, odf-bz-bot, uchapaga
Target Milestone: ---Keywords: FutureFeature
Target Release: ODF 4.12.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 2168840 Environment:
Last Closed: 2023-05-23 09:17:28 UTC Type: ---
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: 2168840    
Bug Blocks:    

Description Nitin Goyal 2023-03-17 05:44:07 UTC
+++ This bug was initially created as a clone of Bug #2168840 +++

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 9 Filip Balák 2023-05-02 11:33:00 UTC
The rule for alert CephMgrIsAbsent is still hardcoded in odf-operator v4.12.3-12:

label_replace((up{job="rook-ceph-mgr"} == 0 or absent(up{job="rook-ceph-mgr"})), "namespace", "openshift-storage", "", "")

--> ASSIGNED

Comment 10 arun kumar mohan 2023-05-03 10:35:42 UTC
@fbalak , can you just confirm the namespace where the StorageSystem (or ODF Cluster) was installed.
If we install it under 'openshift-storage' namespace, we will still see the same ('openshift-storage') namespace hardcoded in the alerts.

So if we want to see any change, we should be installing cluster under different namespace (so that ocs-operator will put/apply all the 'PrometheusRules' yaml files in a different namespace)

Comment 11 Filip Balák 2023-05-03 11:25:06 UTC
The namespace is no longer hardcoded as verified by Jilju.

Comment 18 errata-xmlrpc 2023-05-23 09:17:28 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 (Moderate: Red Hat OpenShift Data Foundation 4.12.3 Security 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/RHSA-2023:3265