Bug 2034544
Summary: | disk.img file is resized up for HPP and NFS storage classes | ||
---|---|---|---|
Product: | Container Native Virtualization (CNV) | Reporter: | Jenia Peimer <jpeimer> |
Component: | Storage | Assignee: | Maya Rashish <mrashish> |
Status: | CLOSED ERRATA | QA Contact: | Jenia Peimer <jpeimer> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 4.10.0 | CC: | akalenyu, alitke, awels, cnv-qe-bugs, mrashish, yadu |
Target Milestone: | --- | ||
Target Release: | 4.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | CNV v4.10.0-598 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-03-16 16:05:38 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
Jenia Peimer
2021-12-21 09:37:13 UTC
Hi, Alex, could you please sit with Jenia to see what is going on? Would it be preferable to use min(pvc.status.requests, pvc.spec.requests) as the PVC size for kubevirt resize purposes? So CDI will resize the disk.img to pvc.spec.request. I am not entirely sure how pvc resizes are initiated, but if it is just updating the pvc.spec.request, then we need to try and honor the request size. We need to clearly made a distinction between pcs.spec.request size, and pvc.status.capacity (the capacity comes from the PV). Linked diff containing my proposed change. https://github.com/kubevirt/kubevirt/pull/6999 *** Bug 2040300 has been marked as a duplicate of this bug. *** Verified on CNV v4.10.0-605 HPP - disk.img size is 99090432 bytes = 94.5Mi, as expected $ cat vm-hpp.yaml | grep storage storage: 100Mi storageClassName: hostpath-provisioner $ oc create -f vm-hpp.yaml virtualmachine.kubevirt.io/vm-cirros-datavolume-hpp created $ oc get vmi -A NAMESPACE NAME AGE PHASE IP NODENAME READY default vm-cirros-datavolume-hpp 36s Running ************ c01-jp410-fr-x449r-worker-0-8lr6n True $ oc debug node/c01-jp410-fr-x449r-worker-0-8lr6n sh-4.4# chroot /host sh-4.4# stat var/local-basic/csi/pvc-346983a2-f464-4ef2-88e8-4f6ee4b3261c/disk.img | grep Size Size: 99090432 Blocks: 88080 IO Block: 4096 regular file NFS - disk.img size is 99090432 bytes = 94.5Mi, as expected $ cat vm-nfs.yaml | grep storage storage: 100Mi storageClassName: nfs $ oc create -f vm-nfs.yaml virtualmachine.kubevirt.io/vm-cirros-nfs created $ oc get vmi -A NAMESPACE NAME AGE PHASE IP NODENAME READY default vm-cirros-datavolume-hpp 9m23s Running ************ c01-jp410-fr-x449r-worker-0-8lr6n True default vm-cirros-nfs 20s Running ************ c01-jp410-fr-x449r-worker-0-7qjzg True $ oc get pods -A | grep virt-launcher default virt-launcher-vm-cirros-datavolume-hpp-ggzdm 1/1 Running 0 9m26s default virt-launcher-vm-cirros-nfs-h7sm6 1/1 Running 0 39s $ oc exec virt-launcher-vm-cirros-nfs-h7sm6 -- stat run/kubevirt-private/vmi-disks/datavolumevolume-nfs/disk.img | grep Size Size: 99090432 Blocks: 56032 IO Block: 65536 regular file $ oc get pvc -A NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE default cirros-dv-nfs Bound nfs-pv-01 5Gi RWO,RWX nfs 117m default cirros-dv-simple-hpp Bound pvc-346983a2-f464-4ef2-88e8-4f6ee4b3261c 79Gi RWO hostpath-provisioner 126m openshift-cnv hpp-pool-local-pvc-template-c01-jp410-fr-x449r-worker-0-7qjzg Bound pvc-350cded2-486b-41a8-b37c-023124d586bb 40Gi RWO ocs-storagecluster-ceph-rbd 41h openshift-cnv hpp-pool-local-pvc-template-c01-jp410-fr-x449r-worker-0-8lr6n Bound pvc-f3980f77-67b1-460e-a42b-8404b4d2f384 40Gi RWO ocs-storagecluster-ceph-rbd 41h openshift-cnv hpp-pool-local-pvc-template-c01-jp410-fr-x449r-worker-0-jmtjs Bound pvc-fa19b701-498d-4431-9d54-88b26b84f23f 40Gi RWO ocs-storagecluster-ceph-rbd 41h openshift-storage ocs-deviceset-0-data-0xqmfk Bound local-pv-d5364e03 150Gi RWO local-block-ocs 43h openshift-storage ocs-deviceset-0-data-1b7srq Bound local-pv-e12b9d68 150Gi RWO local-block-ocs 43h openshift-storage ocs-deviceset-0-data-29dsrj Bound local-pv-ebce5123 150Gi RWO local-block-ocs 43h $ oc get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE local-pv-d5364e03 150Gi RWO Delete Bound openshift-storage/ocs-deviceset-0-data-0xqmfk local-block-ocs 43h local-pv-e12b9d68 150Gi RWO Delete Bound openshift-storage/ocs-deviceset-0-data-1b7srq local-block-ocs 43h local-pv-ebce5123 150Gi RWO Delete Bound openshift-storage/ocs-deviceset-0-data-29dsrj local-block-ocs 43h nfs-pv-01 5Gi RWO,RWX Retain Bound default/cirros-dv-nfs nfs 43h nfs-pv-02 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-03 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-04 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-05 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-06 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-07 5Gi RWO,RWX Retain Available nfs 59m nfs-pv-08 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-09 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-10 5Gi RWO,RWX Retain Available nfs 43h nfs-pv-11 25Gi RWO,RWX Retain Available nfs 43h nfs-pv-12 25Gi RWO,RWX Retain Available nfs 43h nfs-pv-13 25Gi RWO,RWX Retain Available nfs 43h nfs-pv-14 25Gi RWO,RWX Retain Available nfs 43h nfs-pv-15 25Gi RWO,RWX Retain Available nfs 43h nfs-pv-16 25Gi RWO,RWX Retain Available nfs 43h nfs-pv-17 70Gi RWO,RWX Retain Available nfs 43h nfs-pv-18 70Gi RWO,RWX Retain Available nfs 43h nfs-pv-19 70Gi RWO,RWX Retain Available nfs 43h nfs-pv-20 70Gi RWO,RWX Retain Available nfs 43h pvc-346983a2-f464-4ef2-88e8-4f6ee4b3261c 79Gi RWO Delete Bound default/cirros-dv-simple-hpp hostpath-provisioner 129m pvc-350cded2-486b-41a8-b37c-023124d586bb 40Gi RWO Delete Bound openshift-cnv/hpp-pool-local-pvc-template-c01-jp410-fr-x449r-worker-0-7qjzg ocs-storagecluster-ceph-rbd 41h pvc-f3980f77-67b1-460e-a42b-8404b4d2f384 40Gi RWO Delete Bound openshift-cnv/hpp-pool-local-pvc-template-c01-jp410-fr-x449r-worker-0-8lr6n ocs-storagecluster-ceph-rbd 41h pvc-fa19b701-498d-4431-9d54-88b26b84f23f 40Gi RWO Delete Bound openshift-cnv/hpp-pool-local-pvc-template-c01-jp410-fr-x449r-worker-0-jmtjs ocs-storagecluster-ceph-rbd 41h 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 (Moderate: OpenShift Virtualization 4.10.0 Images security and 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/RHSA-2022:0947 |