Bug 2142763 - ocs-operator image does not contains the prometheus rules
Summary: ocs-operator image does not contains the prometheus rules
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: build
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ODF 4.12.0
Assignee: Boris Ranto
QA Contact: Shivam Durgbuns
URL:
Whiteboard:
Depends On:
Blocks: 2127186 2138273 2142462 2142767 2142787 2142788 2142793 2142817 2142831
TreeView+ depends on / blocked
 
Reported: 2022-11-15 08:17 UTC by Nitin Goyal
Modified: 2023-08-09 16:37 UTC (History)
8 users (show)

Fixed In Version: 4.12.0-114
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-08 14:06:28 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage ocs-ci pull 7146 0 None Merged BZ-2142763 Prometheus File 2023-03-03 11:37:39 UTC

Description Nitin Goyal 2022-11-15 08:17:33 UTC
Description of problem
======================

Prometheus rules files are not getting copied correctly inside a container image.

Version of all relevant components
==================================

Steps to Reproduce
==================

1.
2.
3.


Actual results
==============


Expected results
================


Additional info
===============

{"level":"error","ts":1668494698.5665038,"logger":"controllers.StorageCluster","msg":"Prometheus rules file not found.","Request.Namespace":"openshift-storage","Request.Name":"ocs-storagecluster","error":"stat /ocs-prometheus-rules/prometheus-ocs-rules.yaml: not a directory","stacktrace":"github.com/red-hat-storage/ocs-operator/controllers/storagecluster.(*StorageClusterReconciler).reconcilePhases\n\t/remote-source/app/controllers/storagecluster/reconcile.go:529\ngithub.com/red-hat-storage/ocs-operator/controllers/storagecluster.(*StorageClusterReconciler).Reconcile\n\t/remote-source/app/controllers/storagecluster/reconcile.go:166\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:121\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:320\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:234"}

Comment 3 Boris Ranto 2022-11-15 09:30:45 UTC
The fix is now merged DS:

https://gitlab.cee.redhat.com/ceph/rhodf/-/commit/ee638659dc2596448f8515eb45b6fb14c47a7e94

It will be available in the next build.

Comment 4 Martin Bukatovic 2022-11-15 11:06:22 UTC
Could you please fill in:

- affected version (based on your current knowledge)
- specify list of affected alerts, I assume it removes all alerts defined in ocs-operator component?

```
$ find . -name '*.libsonnet' | xargs cat | grep alert:
            alert: 'ClusterObjectStoreState',
            alert: 'OdfMirrorDaemonStatus',
            alert: 'OdfPoolMirroringImageHealth',
            alert: 'OdfPoolMirroringImageHealth',
            alert: 'OdfPoolMirroringImageHealth',
            alert: 'ODFPersistentVolumeMirrorStatus',
            alert: 'ODFPersistentVolumeMirrorStatus',
            alert: 'ObcQuotaBytesAlert',
            alert: 'ObcQuotaObjectsAlert',
            alert: 'ObcQuotaBytesExhausedAlert',
            alert: 'ObcQuotaObjectsExhausedAlert',
            alert: 'ClusterObjectStoreState',
```

Comment 7 Shivam Durgbuns 2022-12-06 10:35:02 UTC
The Prometheus rules directory is present in the ocs-operator image
Verification Job: https://docs.google.com/document/d/12snxYCPn1YaqRv6vphDvgKXpf1BU_4lh3dsPI9Q_8QU/edit?usp=sharing


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