Bug 1779208
| Summary: | Capacity breakdown card should show absolute values and not hourly averaged values | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Anmol Sachan <asachan> | ||||||||||
| Component: | Console Storage Plugin | Assignee: | Anmol Sachan <asachan> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Oded <oviner> | ||||||||||
| Severity: | medium | Docs Contact: | |||||||||||
| Priority: | unspecified | ||||||||||||
| Version: | 4.3.0 | CC: | afrahman, aos-bugs, asachan, ebenahar, nthomas | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Target Release: | 4.4.0 | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | |||||||||||||
| : | 1781037 (view as bug list) | Environment: | |||||||||||
| Last Closed: | 2020-05-18 13:35:02 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: | 1781037 | ||||||||||||
| Attachments: |
|
||||||||||||
Created attachment 1641684 [details]
Expected
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
@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.
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
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
Created attachment 1673172 [details]
Capacity Pod on UI
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
Created attachment 1682493 [details]
UI OCP 4.4, capacity
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 |
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: