Bug 2035334 - [RFE] [OCPonRHV] Provision machines with preallocated disks
Summary: [RFE] [OCPonRHV] Provision machines with preallocated disks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: 4.11.0
Assignee: Janos Bonic
QA Contact: Veronika Fuxova
Eli Marcus
URL:
Whiteboard:
Depends On: 2056454 2056460 2078895 2082535
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-23 16:10 UTC by Juan Orti
Modified: 2022-08-10 10:41 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: OpenShift on RHV installation now supports preallocated disks Reason: In high load environments preallocated disks can bring benefits in terms of performance for etcd and other OpenShift components. Result: As requested in this RFE, the OpenShift installation on RHV now supports provisioning preallocated disks for control plane and worker nodes in case of an IPI installation. Please see the OpenShift documentation for details on enabling preallocation.
Clone Of:
Environment:
Last Closed: 2022-08-10 10:41:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OCPRHV-688 0 None None None 2022-02-10 15:03:11 UTC
Red Hat Knowledge Base (Solution) 6645971 0 None None None 2022-01-17 11:06:35 UTC
Red Hat Knowledge Base (Solution) 6907931 0 None None None 2022-04-12 02:21:33 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:41:27 UTC

Description Juan Orti 2021-12-23 16:10:09 UTC
Description of problem:

In a cluster installed with IPI on RHV, all VMs are created with thin disks that are dependent on the template. I open this RFE to request adding an option to create the disks as preallocated, so the OS disk will be cloned from the template to a preallocated disk.

The preallocated disks will consume more space, but have a better performance and can avoid some problems like running out of space in the storage domain or that the VM is paused during high IO writes due to RHV's mechanism of expansion of the thin disks

I see this feature especially important for the master nodes.

Comment 1 Evgeny Slutsky 2021-12-23 20:14:41 UTC
RHEV doesn't support creating templates with pre-allocated disks on file-based storage [0].
we can check the feasibility on block storage, will that help?

[0] https://access.redhat.com/solutions/3369061

Comment 2 Juan Orti 2021-12-27 07:29:29 UTC
(In reply to Evgeny Slutsky from comment #1)
> RHEV doesn't support creating templates with pre-allocated disks on
> file-based storage [0].

The template can be thin provisioned, that's not a problem. What I'm requesting is creating the VMs from the template using the "clone" option, as opposed to the "thin" option that it's used now. That will create a full copy of the template disk that you can choose to be preallocated (raw). See the RHV documentation:

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/virtual_machine_management_guide/creating_a_cloned_virtual_machine_based_on_a_template

Comment 3 Evgeny Slutsky 2021-12-27 08:10:38 UTC
(In reply to Juan Orti from comment #2)
> (In reply to Evgeny Slutsky from comment #1)
> > RHEV doesn't support creating templates with pre-allocated disks on
> > file-based storage [0].
> 
> The template can be thin provisioned, that's not a problem. What I'm
> requesting is creating the VMs from the template using the "clone" option,
> as opposed to the "thin" option that it's used now. That will create a full
> copy of the template disk that you can choose to be preallocated (raw). See
> the RHV documentation:
> 
> https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/
> html/virtual_machine_management_guide/
> creating_a_cloned_virtual_machine_based_on_a_template

Yes, from my experiments with RHV that also doesn't work on file-based storage (NFS). @nir can you elaborate on that?

Comment 4 Juan Orti 2021-12-27 09:00:49 UTC
I've just tested with NFS storage selecting to clone from template and use raw disk, and it's true that the disk is created as thin provisioned. However the resulting disk image is in raw format and and the whole file size is allocated:

# egrep '^FORMAT|^TYPE' a98549af-0853-42fc-b2a2-33e1bfe97ae4.meta
FORMAT=RAW
TYPE=SPARSE

# qemu-img info a98549af-0853-42fc-b2a2-33e1bfe97ae4
image: a98549af-0853-42fc-b2a2-33e1bfe97ae4
file format: raw
virtual size: 5 GiB (5368709120 bytes)
disk size: 640 MiB


So in my opinion this will also be a performance gain and will guarantee that all the space is available when using file-based SDs.

Comment 5 Evgeny Slutsky 2021-12-27 09:08:06 UTC
(In reply to Juan Orti from comment #4)
> I've just tested with NFS storage selecting to clone from template and use
> raw disk, and it's true that the disk is created as thin provisioned.
> However the resulting disk image is in raw format and and the whole file
> size is allocated:
> 
> # egrep '^FORMAT|^TYPE' a98549af-0853-42fc-b2a2-33e1bfe97ae4.meta
> FORMAT=RAW
> TYPE=SPARSE
> 
> # qemu-img info a98549af-0853-42fc-b2a2-33e1bfe97ae4
> image: a98549af-0853-42fc-b2a2-33e1bfe97ae4
> file format: raw
> virtual size: 5 GiB (5368709120 bytes)
> disk size: 640 MiB
> 
> 
> So in my opinion this will also be a performance gain and will guarantee
> that all the space is available when using file-based SDs.

its thin indeed..
if it was preallocated: disk size >= virtual size

Comment 14 Michal Skrivanek 2022-01-28 12:39:31 UTC
let's stop mixing separate concepts

A VM created from a template can be created with (in webadmin UI) "Storage Allocation" "Thin" or "Clone, which crates a linked (thin qcow on top of template base) or independent(full copy) disks. For API see https://github.com/oVirt/ovirt-engine-api-model/blob/master/src/main/java/services/VmsService.java#L229

For linked VMs qcow is the only option
For independent VMs the disk "Format" can be selected, "qcow" or "raw"

Separately, the disk can be allocated as "sparse/thin provisioned" or "preallocated"
Depending on the type of the storage domain not all combinations are possible. Also UI and API is limiting the combinations.

Comment 16 Janos Bonic 2022-02-21 10:14:47 UTC
The dependent bugs 2056454 and 2056460 have now been created for the component implementations in the installer and the cluster API provider, respectively. The documentation updates will be tracked in those Bugzilla entries.

This Bugzilla will be updated once all necessary components have been merged and the feature is available in nightly builds.

Comment 17 Janos Bonic 2022-03-23 14:19:38 UTC
All components needed for this RFE have now been either merged or have a pending PR, moving to POST.

Comment 18 Michael Burman 2022-05-25 08:40:20 UTC
Verified on - OCP version: 4.11.0-0.nightly-2022-05-18-053037 
Platform: RHV 4.5.0.6-0.7.el8ev

Comment 20 errata-xmlrpc 2022-08-10 10:41:05 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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:5069


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