Bug 1779208 - Capacity breakdown card should show absolute values and not hourly averaged values
Summary: Capacity breakdown card should show absolute values and not hourly averaged v...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Storage Plugin
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.4.0
Assignee: Anmol Sachan
QA Contact: Oded
URL:
Whiteboard:
Depends On:
Blocks: 1781037
TreeView+ depends on / blocked
 
Reported: 2019-12-03 14:03 UTC by Anmol Sachan
Modified: 2020-05-18 13:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1781037 (view as bug list)
Environment:
Last Closed: 2020-05-18 13:35:02 UTC
Target Upstream Version:


Attachments (Terms of Use)
Current setup (15.60 KB, image/png)
2019-12-03 14:03 UTC, Anmol Sachan
no flags Details
Expected (15.91 KB, image/png)
2019-12-03 14:05 UTC, Anmol Sachan
no flags Details
Capacity Pod on UI (26.03 KB, image/png)
2020-03-24 16:59 UTC, Oded
no flags Details
UI OCP 4.4, capacity (18.61 KB, image/png)
2020-04-28 14:18 UTC, Oded
no flags Details


Links
System ID Priority Status Summary Last Updated
Github openshift console pull 3647 'None' closed Bug 1779208: Capacity breakdown card queries - changed average to absolute values 2020-05-11 09:44:31 UTC
Red Hat Product Errata RHBA-2020:2133 None None None 2020-05-18 13:35:29 UTC

Description Anmol Sachan 2019-12-03 14:03:26 UTC
Created attachment 1641683 [details]
Current setup

Description of problem:

Currently, the storage usage in the Capacity breakdown card shown is the hourly average of the values. It should be an absolute value.

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


How reproducible:


Steps to Reproduce:
1. Create an OCS setup.
2. Push data into the setup.
3. After pushing the data, compare the actual size of data-pushed and the shown( by project, storageclass or pods)

Actual results: The usage values shown are lesser than the actual consumption.


Expected results: The usage values should be the same as consumption.


Additional info:

Comment 1 Anmol Sachan 2019-12-03 14:05:07 UTC
Created attachment 1641684 [details]
Expected

Comment 3 Oded 2020-03-19 09:17:30 UTC
I tried to create PVC for Block Storage.
PVC on Pending Mode,rbd pool not found.
I tried to work with "ocs-storagecluster-cephblockpool",same results.

SetUp:
*AWS-IPI

*oc version:
(.venv) [odedviner@localhost ocs-ci]$ oc version
Client Version: 4.3.5
Server Version: 4.3.0-0.nightly-2020-03-18-011727
Kubernetes Version: v1.16.2


Test Process:
1.Activate ocs-env:
source .venv/bin/activate


2.Create pool Yaml file::
(.venv) [odedviner@localhost ocs-ci]$ cat pool.yaml
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
  name: rbd
  namespace: openshift-storage
spec:
  failureDomain: host
  replicated:
    size: 2


3.Create pool:
(.venv) [odedviner@localhost ocs-ci]$ oc create -f pool.yaml
cephblockpool.ceph.rook.io/rbd created


4. Get ceph block pool:
(.venv) [odedviner@localhost ocs-ci]$ oc get cephblockpool -n openshift-storage
NAME                               AGE
ocs-storagecluster-cephblockpool   103m
rbd                                27s


5.Create pvc.yaml file
(.venv) [odedviner@localhost ocs-ci]$ cat pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: ocs-pvc3
  namespace: openshift-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: rbd


6.Create PVC
(.venv) [odedviner@localhost ocs-ci]$ oc apply -f pvc.yaml
persistentvolumeclaim/ocs-pvc3 created


7.Look at the PersistentVolumeClaim:
(.venv) [odedviner@localhost ocs-ci]$ oc get pvc -n openshift-storage | grep ocs-pvc3
ocs-pvc3                  Pending

                           
8.Check PVC status:
oc describe pvc ocs-pvc3 -n openshift-storage
(.venv) [odedviner@localhost ocs-ci]$ oc describe pvc ocs-pvc3 -n openshift-storage
Name:          ocs-pvc3
Namespace:     openshift-storage
StorageClass:  rbd
Status:        Pending
Volume:        
Labels:        <none>
Annotations:   kubectl.kubernetes.io/last-applied-configuration:
                 {"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"name":"ocs-pvc3","namespace":"openshift-storage"},"spec":{...
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
Mounted By:    <none>
Events:
  Type     Reason              Age                 From                         Message
  ----     ------              ----                ----                         -------
  Warning  ProvisioningFailed  15s (x9 over 2m6s)  persistentvolume-controller  storageclass.storage.k8s.io "rbd" not found

Comment 4 afrahman 2020-03-20 04:59:45 UTC
@Oded

The Message says: storageclass.storage.k8s.io "rbd" not found
And when you create a storage cluster OCS creates rbd class with the name: {storage-cluster-name}-ceph-rbd.
I am not sure what environment you are setting by  (source .venv/bin/activate), but you should check the name of rbd storage class that you are putting in your PVC yaml.

Comment 5 Oded 2020-03-24 16:54:29 UTC
SetUp:
*AWS-IPI

*oc version:
[odedviner@localhost ocs-ci]$ oc version
Client Version: 4.3.5
Server Version: 4.4.0-0.nightly-2020-03-24-101858
Kubernetes Version: v1.17.1


Test Process:
1.Get Storage Class
[odedviner@localhost ocs-ci]$ oc get sc -n openshift-storage 
NAME                          PROVISIONER                             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
gp2                           kubernetes.io/aws-ebs                   Delete          WaitForFirstConsumer   true                   162m
ocs-storagecluster-ceph-rbd   openshift-storage.rbd.csi.ceph.com      Delete          Immediate              false                  147m
ocs-storagecluster-cephfs     openshift-storage.cephfs.csi.ceph.com   Delete          Immediate              false                  147m
openshift-storage.noobaa.io   openshift-storage.noobaa.io/obc         Delete          Immediate              false                  141m


2.Create pvc.yaml file
(.venv) [odedviner@localhost ocs-ci]$ cat pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: ocs-pvc5
  namespace: openshift-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: ocs-storagecluster-ceph-rbd 


3.Create PVC
(.venv) [odedviner@localhost ocs-ci]$ oc apply -f pvc.yaml
persistentvolumeclaim/ocs-pvc5 created


4.Check PVC status:
[odedviner@localhost ocs-ci]$ oc get pvc ocs-pvc5 -n openshift-storage
NAME       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
ocs-pvc5   Bound    pvc-7ffee941-ac4e-4ad5-8396-8a46c0804dd1   94Gi       RWO            ocs-storagecluster-ceph-rbd   54m

5.Create pod.yaml file
apiVersion: v1
kind: Pod
metadata:
  name: csirbd-pod
  namespace: openshift-storage
spec:
  containers:
   - name: web-server
     image: nginx
     volumeMounts:
       - name: mypvc
         mountPath: /var/lib/www/html
  volumes:
   - name: mypvc
     persistentVolumeClaim:
       claimName: ocs-pvc5
       readOnly: false

6.Apply pod on "ocs-pvc5" PVC
[odedviner@localhost ocs-ci]$ oc apply -f pod.yaml --namespace=openshift-storage
pod/csirbd-pod created

7.Check Pod Status:
[odedviner@localhost ocs-ci]$ oc get pods csirbd-pod --namespace=openshift-storage
NAME         READY   STATUS    RESTARTS   AGE
csirbd-pod   1/1     Running   0          30s

8.Go go Pod
[odedviner@localhost ocs-ci]$ oc rsh -n openshift-storage csirbd-pod
#


10.Go to bash mode:
# bash
root@csirbd-pod:~# 

11.Change Directory:
root@csirbd-pod:~# cd /var/lib/www/html/
root@csirbd-pod:/var/lib/www/html#

12.Check Disk Space Usage:
root@csirbd-pod:/var/lib/www/html# df /var/lib/www/html -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd2        93G   92M   92G   1% /var/lib/www/html

13.Run Bash script:
touch file1 && let i=0; while true; do echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit, " >> file1$i; let i++; sleep 0.01; done

14.Stop Script:
ctrl+c

15.Check Disk Space Usage:
root@csirbd-pod:/var/lib/www/html# df /var/lib/www/html -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd2        93G  170M   92G   1% /var/lib/www/html

16.Go to UI:
Home->overview->Persistent Storage->Pods
See attachment
The capacity of Pod csirbd-pod=169.3MB

Comment 6 Oded 2020-03-24 16:55:29 UTC
SetUp:
*AWS-IPI

*oc version:
[odedviner@localhost ocs-ci]$ oc version
Client Version: 4.3.5
Server Version: 4.4.0-0.nightly-2020-03-24-101858
Kubernetes Version: v1.17.1


Test Process:
1.Get Storage Class
[odedviner@localhost ocs-ci]$ oc get sc -n openshift-storage 
NAME                          PROVISIONER                             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
gp2                           kubernetes.io/aws-ebs                   Delete          WaitForFirstConsumer   true                   162m
ocs-storagecluster-ceph-rbd   openshift-storage.rbd.csi.ceph.com      Delete          Immediate              false                  147m
ocs-storagecluster-cephfs     openshift-storage.cephfs.csi.ceph.com   Delete          Immediate              false                  147m
openshift-storage.noobaa.io   openshift-storage.noobaa.io/obc         Delete          Immediate              false                  141m


2.Create pvc.yaml file
(.venv) [odedviner@localhost ocs-ci]$ cat pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: ocs-pvc5
  namespace: openshift-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: ocs-storagecluster-ceph-rbd 


3.Create PVC
(.venv) [odedviner@localhost ocs-ci]$ oc apply -f pvc.yaml
persistentvolumeclaim/ocs-pvc5 created


4.Check PVC status:
[odedviner@localhost ocs-ci]$ oc get pvc ocs-pvc5 -n openshift-storage
NAME       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
ocs-pvc5   Bound    pvc-7ffee941-ac4e-4ad5-8396-8a46c0804dd1   94Gi       RWO            ocs-storagecluster-ceph-rbd   54m

5.Create pod.yaml file
apiVersion: v1
kind: Pod
metadata:
  name: csirbd-pod
  namespace: openshift-storage
spec:
  containers:
   - name: web-server
     image: nginx
     volumeMounts:
       - name: mypvc
         mountPath: /var/lib/www/html
  volumes:
   - name: mypvc
     persistentVolumeClaim:
       claimName: ocs-pvc5
       readOnly: false

6.Apply pod on "ocs-pvc5" PVC
[odedviner@localhost ocs-ci]$ oc apply -f pod.yaml --namespace=openshift-storage
pod/csirbd-pod created

7.Check Pod Status:
[odedviner@localhost ocs-ci]$ oc get pods csirbd-pod --namespace=openshift-storage
NAME         READY   STATUS    RESTARTS   AGE
csirbd-pod   1/1     Running   0          30s

8.Go go Pod
[odedviner@localhost ocs-ci]$ oc rsh -n openshift-storage csirbd-pod
#


10.Go to bash mode:
# bash
root@csirbd-pod:~# 

11.Change Directory:
root@csirbd-pod:~# cd /var/lib/www/html/
root@csirbd-pod:/var/lib/www/html#

12.Check Disk Space Usage:
root@csirbd-pod:/var/lib/www/html# df /var/lib/www/html -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd2        93G   92M   92G   1% /var/lib/www/html

13.Run Bash script:
touch file1 && let i=0; while true; do echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit, " >> file1$i; let i++; sleep 0.01; done

14.Stop Script:
ctrl+c

15.Check Disk Space Usage:
root@csirbd-pod:/var/lib/www/html# df /var/lib/www/html -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd2        93G  170M   92G   1% /var/lib/www/html

16.Go to UI:
Home->overview->Persistent Storage->Pods
See attachment
The capacity of Pod csirbd-pod=169.3MB

Comment 7 Oded 2020-03-24 16:59:15 UTC
Created attachment 1673172 [details]
Capacity Pod on UI

Comment 9 Oded 2020-04-28 14:15:35 UTC
SetUp:
*AWS-IPI

*oc version:
[odedviner@localhost ocs-ci]$ oc version
Client Version: 4.3.5
Server Version: 4.4.0-0.nightly-2020-03-24-101858
Kubernetes Version: v1.17.1


Test Process:
1.Get Storage Class
[odedviner@localhost ocs-ci]$ oc get sc -n openshift-storage 
NAME                          PROVISIONER                             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
gp2                           kubernetes.io/aws-ebs                   Delete          WaitForFirstConsumer   true                   162m
ocs-storagecluster-ceph-rbd   openshift-storage.rbd.csi.ceph.com      Delete          Immediate              false                  147m
ocs-storagecluster-cephfs     openshift-storage.cephfs.csi.ceph.com   Delete          Immediate              false                  147m
openshift-storage.noobaa.io   openshift-storage.noobaa.io/obc         Delete          Immediate              false                  141m


2.Create pvc.yaml file
(.venv) [odedviner@localhost ocs-ci]$ cat pvc.yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: ocs-pvc5
  namespace: openshift-storage
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
  storageClassName: ocs-storagecluster-ceph-rbd 


3.Create PVC
(.venv) [odedviner@localhost ocs-ci]$ oc apply -f pvc.yaml
persistentvolumeclaim/ocs-pvc5 created


4.Check PVC status:
[odedviner@localhost ocs-ci]$ oc get pvc ocs-pvc5 -n openshift-storage
NAME       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                  AGE
ocs-pvc5   Bound    pvc-7ffee941-ac4e-4ad5-8396-8a46c0804dd1   94Gi       RWO            ocs-storagecluster-ceph-rbd   54m

5.Create pod.yaml file
apiVersion: v1
kind: Pod
metadata:
  name: csirbd-pod
  namespace: openshift-storage
spec:
  containers:
   - name: web-server
     image: nginx
     volumeMounts:
       - name: mypvc
         mountPath: /var/lib/www/html
  volumes:
   - name: mypvc
     persistentVolumeClaim:
       claimName: ocs-pvc5
       readOnly: false

6.Apply pod on "ocs-pvc5" PVC
[odedviner@localhost ocs-ci]$ oc apply -f pod.yaml --namespace=openshift-storage
pod/csirbd-pod created

7.Check Pod Status:
[odedviner@localhost ocs-ci]$ oc get pods csirbd-pod --namespace=openshift-storage
NAME         READY   STATUS    RESTARTS   AGE
csirbd-pod   1/1     Running   0          30s

8.Go go Pod
[odedviner@localhost ocs-ci]$ oc rsh -n openshift-storage csirbd-pod
#


10.Go to bash mode:
# bash
root@csirbd-pod:~# 

11.Change Directory:
root@csirbd-pod:~# cd /var/lib/www/html/
root@csirbd-pod:/var/lib/www/html#

12.Check Disk Space Usage:
root@csirbd-pod:/var/lib/www/html# df /var/lib/www/html -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd2        93G   92M   92G   1% /var/lib/www/html

13.Run Bash script:
touch file1 && let i=0; while true; do echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit, " >> file1$i; let i++; sleep 0.01; done

14.Stop Script:
ctrl+c

15.Check Disk Space Usage:
root@csirbd-pod:/var/lib/www/html# df /var/lib/www/html -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/rbd0        98G  399M   98G   1% /var/lib/www/html

16.Go to UI:
Home->overview->Persistent Storage->Pods
See attachment
The capacity of Pod csirbd-pod=398.2MiB
*attached pic

Comment 10 Oded 2020-04-28 14:18:06 UTC
Created attachment 1682493 [details]
UI OCP 4.4, capacity

Comment 17 errata-xmlrpc 2020-05-18 13:35:02 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, 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:2133


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