This bug was initially created as a copy of Bug #2142763 I am copying this bug because: Description of problem (please be detailed as possible and provide log snippets): Prometheus rules files are not getting copied correctly inside a container image. 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: {"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"}
The Prometheus rules directory is present in the ocs-operator pod. Verified. [sdurgbun@sdurgbun testingpods]$ sudo podman run --pull always -it --entrypoint /bin/sh 'registry-proxy.engineering.redhat.com/rh-osbs/ocs4-ocs-rhel8-operator:v4.8.17-2' Trying to pull registry-proxy.engineering.redhat.com/rh-osbs/ocs4-ocs-rhel8-operator:v4.8.17-2... Getting image source signatures Copying blob 0e374c0036ab skipped: already exists Copying blob 725a55c42126 skipped: already exists Copying config 0fa41e3795 done Writing manifest to image destination Storing signatures sh-4.4# sh-4.4# sh-4.4# hostid 580a0300 sh-4.4# sh-4.4# sh-4.4# ls bin etc lib64 mnt proc sbin tmp boot home lost+found ocs-prometheus-rules root srv usr dev lib media opt run sys var sh-4.4# ls ocs-prometheus-rules/ prometheus-ocs-rules-external.yaml prometheus-ocs-rules.yaml sh-4.4# sh-4.4#
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 OpenShift Container Storage 4.8.17 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-2022:9030