+++ This bug was initially created as a clone of Bug #2001047 +++ Description of problem: When the user creates a DV using the DV.spec.storage section to indicate the image size, our logic may not create a PVC with enough space after factoring in FS overhead. Version-Release number of selected component (if applicable): 4.9.0 How reproducible: Always with certain numbers Steps to Reproduce: 0. Use the default fs overhead setting of 5.5% 1. Create a DV with spec.storage.requests.storage = 44384169 bytes and set it to import an image with a virtualsize of 41350695 bytes Actual results: The import fails because there is not enough space on the PVC once FS overhead is factored in Expected results: The import should succeed Additional info: We need to make the following adjustments to the logic that chooses the PVC size: * Start with the value in DV.spec.storage.requests.storage (VS) * Round VS up to the next 1MB to get an aligned size (AS) * Perform FS overhead calculation on AS to get requested size (RS) * RS = AS / (1 - fs-overhead-from-cdiconfig) * Convert RS to an integer by rounding up * RS should be used as the PVC size
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.2 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-2021:3598