Bug 1961227
| Summary: | Block DV using new storage spec creates PVC too large | ||
|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Adam Litke <alitke> |
| Component: | Storage | Assignee: | Bartosz Rybacki <brybacki> |
| Status: | CLOSED ERRATA | QA Contact: | Yan Du <yadu> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.8.0 | CC: | brybacki, cnv-qe-bugs, mrashish, yadu |
| Target Milestone: | --- | ||
| Target Release: | 4.8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | virt-cdi-importer v4.8.0-19 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-07-27 14:32:06 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: | |||
Bartosz, please take a look. I managed to recreate it, now checking what is wrong. Test on OCP4.8 and virt-cdi-importer-container-v4.8.0-19, issue have been fixed.
DV:
------------8<-----------------
spec:
source:
blank: {}
storage:
resources:
requests:
storage: 1Gi
storageClassName: ocs-storagecluster-ceph-rbd
------------8<-----------------
PVC:
------------8<-----------------
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: ocs-storagecluster-ceph-rbd
volumeMode: Block
volumeName: pvc-0b006c8b-7b59-48d5-91d6-b5bdff3e9284
status:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
phase: Bound
------------8<-----------------
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.8.0 Images), 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-2021:2920 |
Description of problem: When creating a DV using the new storage spec to auto-detect volume mode and access mode, the PVC size is padded when it should not be. Version-Release number of selected component (if applicable): virt-cdi-operator-container-v4.8.0-17 How reproducible: Always Steps to Reproduce: 1. Deploy cluster with OCS 2. Create the DV indicated below Actual results: PVC is created with block mode and a size request larger than 1G Expected results: PVC is created with a size request of 1G Additional info: === Example DV: === apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: name: blank-dv-with-storage spec: source: blank: {} storage: storageClassName: ocs-storagecluster-ceph-rbd resources: requests: storage: 1Gi === Resulting PVC: === kind: PersistentVolumeClaim apiVersion: v1 metadata: annotations: cdi.kubevirt.io/storage.contentType: kubevirt cdi.kubevirt.io/storage.import.source: none cdi.kubevirt.io/storage.pod.phase: Succeeded cdi.kubevirt.io/storage.pod.restarts: '0' cdi.kubevirt.io/storage.preallocation.requested: 'false' pv.kubernetes.io/bind-completed: 'yes' pv.kubernetes.io/bound-by-controller: 'yes' volume.beta.kubernetes.io/storage-provisioner: openshift-storage.rbd.csi.ceph.com resourceVersion: '3943816' name: blank-dv-with-storage uid: 2327bf70-d828-42d8-8737-f7bc0f5dce97 creationTimestamp: '2021-05-17T14:55:01Z' managedFields: - manager: kube-controller-manager operation: Update apiVersion: v1 time: '2021-05-17T14:55:01Z' fieldsType: FieldsV1 fieldsV1: 'f:metadata': 'f:annotations': 'f:pv.kubernetes.io/bind-completed': {} 'f:pv.kubernetes.io/bound-by-controller': {} 'f:volume.beta.kubernetes.io/storage-provisioner': {} 'f:spec': 'f:volumeName': {} 'f:status': 'f:accessModes': {} 'f:capacity': .: {} 'f:storage': {} 'f:phase': {} - manager: virt-cdi-controller operation: Update apiVersion: v1 time: '2021-05-17T14:55:01Z' fieldsType: FieldsV1 fieldsV1: 'f:metadata': 'f:annotations': .: {} 'f:cdi.kubevirt.io/storage.contentType': {} 'f:cdi.kubevirt.io/storage.import.source': {} 'f:cdi.kubevirt.io/storage.pod.phase': {} 'f:cdi.kubevirt.io/storage.pod.restarts': {} 'f:cdi.kubevirt.io/storage.preallocation.requested': {} 'f:labels': .: {} 'f:app': {} 'f:ownerReferences': .: {} 'k:{"uid":"d47965b9-22f1-4910-adb4-a6c8736dc865"}': .: {} 'f:apiVersion': {} 'f:blockOwnerDeletion': {} 'f:controller': {} 'f:kind': {} 'f:name': {} 'f:uid': {} 'f:spec': 'f:accessModes': {} 'f:resources': 'f:requests': .: {} 'f:storage': {} 'f:storageClassName': {} 'f:volumeMode': {} namespace: default ownerReferences: - apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume name: blank-dv-with-storage uid: d47965b9-22f1-4910-adb4-a6c8736dc865 controller: true blockOwnerDeletion: true finalizers: - kubernetes.io/pvc-protection labels: app: containerized-data-importer spec: accessModes: - ReadWriteMany resources: requests: storage: '1136235008' volumeName: pvc-2327bf70-d828-42d8-8737-f7bc0f5dce97 storageClassName: ocs-storagecluster-ceph-rbd volumeMode: Block status: phase: Bound accessModes: - ReadWriteMany capacity: storage: 2Gi