Bug 2097436
Summary: | Online disk expansion ignores filesystem overhead change | ||
---|---|---|---|
Product: | Container Native Virtualization (CNV) | Reporter: | Kevin Alon Goldblatt <kgoldbla> |
Component: | Storage | Assignee: | Álvaro Romero <alromero> |
Status: | CLOSED ERRATA | QA Contact: | Kevin Alon Goldblatt <kgoldbla> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.11.0 | CC: | mrashish, yadu |
Target Milestone: | --- | ||
Target Release: | 4.12.0 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | CNV v4.12.0-260 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-01-24 13:36:39 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: |
Description
Kevin Alon Goldblatt
2022-06-15 16:49:21 UTC
Test on the following version: [cloud-user@ocp-psi-executor ~]$ oc version Client Version: 4.12.0-ec.1 Kustomize Version: v4.5.4 Server Version: 4.12.0-ec.1 Kubernetes Version: v1.24.0+a9d6306 [cloud-user@ocp-psi-executor ~]$ oc get csv -n openshift-cnv NAME DISPLAY VERSION REPLACES PHASE kubevirt-hyperconverged-operator.v4.12.0 OpenShift Virtualization 4.12.0 kubevirt-hyperconverged-operator.v4.10.5 Succeeded Steps to Reproduce: 1. Edit the HCO cr to change the filesystem overhead to 20%: [cloud-user@ocp-psi-executor ~]$ oc describe hco -n openshift-cnv ... Spec: Filesystem Overhead: Storage Class: Nfs: 0.2<<<<<<<<<< 2. Create a VM requesting a volume size of 2G: [cloud-user@ocp-psi-executor ~]$ oc get vm NAME AGE STATUS READY vm-cirros-datavolume1 37m Running True 3. Check the storage request: [cloud-user@ocp-psi-executor ~]$ oc get pvc cirros-dv -oyaml ... spec: accessModes: - ReadWriteOnce resources: requests: storage: 100M storageClassName: nfs volumeMode: Filesystem 4. Check the online expansion requested by the vmi: [cloud-user@ocp-psi-executor ~]$ oc get vmi vm-cirros-datavolume1 -oyaml ... volumeStatus: - name: datavolumevolume persistentVolumeClaimInfo: accessModes: - ReadWriteOnce capacity: storage: 5Gi filesystemOverhead: "0.2"<<<<<<<<<<<<<<<< requests: storage: 100M volumeMode: Filesystem So we get the expected result that the updated filesystem overhead of 20% have been used in the online expansion. The version is 4.12.0-425. Verified with the following code: ----------------------------------------- oc version Client Version: 4.8.0-fc.2 Server Version: 4.12.0-ec.1 Kubernetes Version: v1.24.0+a9d6306 oc get csv -n openshift-cnv NAME DISPLAY VERSION REPLACES PHASE kubevirt-hyperconverged-operator.v4.12.0 OpenShift Virtualization 4.12.0 kubevirt-hyperconverged-operator.v4.10.5 Succeeded volsync-product.v0.5.0 VolSync 0.5.0 Succeeded Deployed: OCP-4.12.0-ec.1 Deployed: CNV-v4.12.0-450 Verified with the following scenario: ----------------------------------------- 1. Edit the hco cr 'oc edit hco -n openshift-cnv' and change the filesystem overhead to 20%: filesystemOverhead: storageClass: nfs: "0.2" 2.See that nfs filesystem overhead was updted to 0.2: oc get cdiconfig -o jsonpath='{.items..status.filesystemOverhead}' {"global":"0.055","storageClass":{"csi-manila-ceph":"0.055","hostpath-csi-basic":"0.055","hostpath-csi-pvc-block":"0.055","local-block-hpp":"0.055","local-block-ocs":"0.055","nfs":"0.2","ocs-storagecluster-ceph-rbd":"0.055","ocs-storagecluster-ceph-rgw":"0.055","standard-csi":"0.055"}} 3. Create a vm with the yaml below requesting a volume size of 2G 4. Check the storage request with 'oc get pvc cirros-dv4 -oyaml': resources: requests: storage: "2684354560" storageClassName: nfs The pvc size was correctly created to include the filesystem overhead 5. Check the online expansion requested by the vmi 'oc get vmi vm-cirros-datavolume4 -oyaml': volumeStatus: - name: datavolumedisk1 persistentVolumeClaimInfo: accessModes: - ReadWriteOnce capacity: storage: 5Gi filesystemOverhead: "0.2" >>>>>> THE CORRECT UPDATED EXPANSION WAS USED requests: storage: "2684354560" volumeMode: Filesystem target: vda Actual results: The updated filesystem overhead of 0.2(20%) was requested. Expected results: The correct updated nfs filesystem overhead was used. 6. Accessed the vm and verified the correct requested size is displayed using lsblk: $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 252:0 0 2G 0 disk |-vda1 252:1 0 2G 0 part / `-vda15 252:15 0 8M 0 part Moving this to VERIFIED! Additional info: vm-yaml: apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: labels: kubevirt.io/vm: vm-cirros-datavolume name: vm-cirros-datavolume spec: dataVolumeTemplates: - metadata: creationTimestamp: null name: cirros-dv spec: storage: accessModes: - ReadWriteOnce resources: requests: storage: 2Gi storageClassName: nfs source: http: url: http://xxx.xxx.xxx.com/files/cnv-tests/cirros-images/cirros-0.5.1-x86_64-disk.img running: false template: metadata: labels: kubevirt.io/vm: vm-cirros-datavolume spec: domain: devices: disks: - disk: bus: virtio name: datavolumedisk1 resources: requests: memory: 128Mi terminationGracePeriodSeconds: 0 volumes: - dataVolume: name: cirros-dv name: datavolumedisk1 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 (Important: OpenShift Virtualization 4.12.0 Images security 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/RHSA-2023:0408 |