Bug 1849717

Summary: Capacity alerts for PVCs created by OCS are not available for all namesapce
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Anmol Sachan <asachan>
Component: ceph-monitoringAssignee: Anmol Sachan <asachan>
Status: CLOSED ERRATA QA Contact: Oded <oviner>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.5CC: madam, muagarwa, nthomas, ocs-bugs
Target Milestone: ---Keywords: AutomationBackLog
Target Release: OCS 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: quay.io/rhceph-dev/ocs-olm-operator:4.5.0-475.ci Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1849723 (view as bug list) Environment:
Last Closed: 2020-09-15 10:17:53 UTC Type: Bug
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:    
Bug Blocks: 1849723    
Attachments:
Description Flags
pvc alert
none
pvc alert 2 none

Description Anmol Sachan 2020-06-22 16:04:00 UTC
Description of problem: Openshift PVC full rule is only for namespaces that start with "openshift- or Kube- or default or logging ". All the PVCs provisioned out of OCS provisioners should have the capacity alert.


Version-Release number of selected component (if applicable):


How reproducible: 100


Steps to Reproduce:
1. Create a PVC using OCS storageclass in a namespace not starting with openshift- or Kube- or default or logging.
2. Fill the PVC up to 98 % of the capacity.
3. Check for a PVC full alert

Actual results: No PVC full alert was triggered


Expected results: PVC utilization alert should be triggered.


Additional info:

Comment 3 Michael Adam 2020-06-30 11:21:39 UTC
the mentioned PRs are just upstream PRs and don't justify for MODIFIED.

This is the downstream backport PR: https://github.com/openshift/rook/pull/75

Only with this, we can mark this MODIFIED.

Comment 6 Oded 2020-07-21 12:54:00 UTC
Bug not reconstructed

Setup:
Provider:AWS
OCP Version:4.5.0-0.nightly-2020-07-20-152128
OCS Version:ocs-operator.v4.5.0-494.ci

Test process:
1.Create New project:
oc new-project namespace-test

2.Adding PVC(PVC.yaml):
[storage: 3Gi,storageClassName: ocs-storagecluster-ceph-rbd],(PVC.yaml)
oc -n namespace-test create -f PVC.yaml

3.Check PVC Status reach to Bound state:
oc get pvc pvc-test

4.Adding ServiceAccount[ServiceAccount.yaml]
apiVersion: v1
automountServiceAccountToken: '*****'
kind: ServiceAccount
metadata:
  name: serviceaccount-sa
  namespace: namespace-test
oc -n namespace-test create -f ServiceAccount.yaml

5.Adding DeploymentConfig:
https://github.com/red-hat-storage/ocs-ci/blob/master/ocs_ci/templates/app-pods/fedora_dc.yaml
oc -n namespace-test create -f fedora_dc.yaml

6.install findutils
oc -n namespace-test rsh pod-test-rbd yum install findutils -y


7.Goto Fedora_pod:
oc -n namespace-test-4cc5ba78fde94ebf9f51df5a507aa0c6 rsh pod-test-rbd-393bb9417e9d426d8974f7f65c3c40c5-1-v597s
sh-5.0# 

8.check storage:
# df -h 
Filesystem                            Size  Used Avail Use% Mounted on
/dev/rbd3                             2.9G   90M  2.8G   4% /mnt

9.Create directory:
mkdir /tmp/oded

10.copy 2.7G to /mnt/oded (use this script)
*******************************************************************
#!/bin/bash
for i in {1..2700}
do
   nohup dd if=/dev/urandom of=/mnt/oded/$i bs=1024K count=1 &
done

11.check storage:
sh-5.0# df -h
Filesystem                            Size  Used Avail Use% Mounted on
/dev/rbd3                             2.9G  2.9G     0 100% /mnt

12.Check alerts on UI:
There is alert.
*Attached screenshots

Comment 7 Oded 2020-07-21 12:55:17 UTC
Created attachment 1701887 [details]
pvc alert

Comment 8 Oded 2020-07-21 13:38:14 UTC
Created attachment 1701889 [details]
pvc alert 2

Comment 11 errata-xmlrpc 2020-09-15 10:17:53 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 Container Storage 4.5.0 bug fix and enhancement 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-2020:3754