Bug 2001047 - Automatic size detection may not request a PVC that is large enough for an import
Summary: Automatic size detection may not request a PVC that is large enough for an im...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.9.0
Assignee: Bartosz Rybacki
QA Contact: Jenia Peimer
URL:
Whiteboard:
Depends On:
Blocks: 2001069
TreeView+ depends on / blocked
 
Reported: 2021-09-03 15:55 UTC by Adam Litke
Modified: 2021-11-02 16:01 UTC (History)
2 users (show)

Fixed In Version: v4.9.0-194
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2001069 (view as bug list)
Environment:
Last Closed: 2021-11-02 16:01:09 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-07 14:51:38 UTC
Github kubevirt containerized-data-importer pull 1928 0 None None None 2021-09-07 15:21:00 UTC
Red Hat Product Errata RHSA-2021:4104 0 None None None 2021-11-02 16:01:30 UTC

Description Adam Litke 2021-09-03 15:55:55 UTC
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 4 errata-xmlrpc 2021-11-02 16:01:09 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.9.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-2021:4104


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