Bug 2001069 - [4.8.z] Automatic size detection may not request a PVC that is large enough for an import
Summary: [4.8.z] Automatic size detection may not request a PVC that is large enough f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.8.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.8.2
Assignee: Bartosz Rybacki
QA Contact: Jenia Peimer
URL:
Whiteboard:
Depends On: 2001047
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-03 17:10 UTC by Adam Litke
Modified: 2021-09-21 11:08 UTC (History)
4 users (show)

Fixed In Version: v4.8.2-16
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2001047
Environment:
Last Closed: 2021-09-21 11:08:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 1926 0 None None None 2021-09-08 08:52:55 UTC
Github kubevirt containerized-data-importer pull 1927 0 None None None 2021-09-08 08:52:58 UTC
Red Hat Product Errata RHSA-2021:3598 0 None None None 2021-09-21 11:08:46 UTC

Description Adam Litke 2021-09-03 17:10:33 UTC
+++ 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

Comment 6 errata-xmlrpc 2021-09-21 11:08:45 UTC
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


Note You need to log in before you can comment on or make changes to this bug.