From 421478205b51c8e57c9e5a2db20438cf13d95068 Mon Sep 17 00:00:00 2001 From: Pavel Bar Date: Wed, 18 May 2022 16:15:57 +0300 Subject: [PATCH] core: add new configuration for volume chunk size Adding new configuration for volume chunk size. This duplicates VDSM "irs:volume_utilization_chunk_mb" configuration. https://github.com/oVirt/vdsm/blob/v4.50.1/lib/vdsm/common/config.py.in#L325 Duplicating the configration is bad. But until the configuration is totally moved to engine, we have no other way to use the right size for creating new volumes. Signed-off-by: Pavel Bar Bug-Url: https://bugzilla.redhat.com/1958032 --- .../java/org/ovirt/engine/core/common/config/ConfigValues.java | 3 +++ packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql | 1 + packaging/etc/engine-config/engine-config.properties | 3 +++ 3 files changed, 7 insertions(+) diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java index 8495364b19a..19ffe35bb25 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java @@ -1584,6 +1584,9 @@ public enum ConfigValues { @TypeConverterAttribute(Integer.class) LiveSnapshotFreezeTimeout, + @TypeConverterAttribute(Integer.class) + VolumeUtilizationChunkInMB, + @TypeConverterAttribute(Boolean.class) IsIncrementalBackupSupported, diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql index 4af45eaa602..c9f68843aa4 100644 --- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql +++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql @@ -824,6 +824,7 @@ select fn_db_add_config_value_for_versions_up_to('BiosTypeSupported', 'true', '4 select fn_db_add_config_value('LiveSnapshotTimeoutInMinutes', '30', 'general'); select fn_db_add_config_value('LiveSnapshotAllowInconsistent', 'true', 'general'); select fn_db_add_config_value('LiveSnapshotFreezeTimeout', '8', 'general'); +select fn_db_add_config_value('VolumeUtilizationChunkInMB', '2560', 'general'); -- Cluster level 4.7 and above. -- VirtIO-Win drivers path select fn_db_add_config_value('VirtioWinIsoPath','/usr/share/virtio-win','general'); diff --git a/packaging/etc/engine-config/engine-config.properties b/packaging/etc/engine-config/engine-config.properties index 221128a4ef3..f73c76e79a0 100644 --- a/packaging/etc/engine-config/engine-config.properties +++ b/packaging/etc/engine-config/engine-config.properties @@ -550,6 +550,9 @@ LiveSnapshotPerformFreezeInEngine.type=Boolean LiveSnapshotFreezeTimeout.description=The live snapshot command without memory timeout in minutes LiveSnapshotFreezeTimeout.type=Integer LiveSnapshotFreezeTimeout.validValues=1..3000 +VolumeUtilizationChunkInMB.description="Size of extension chunk in megabytes. Use higher values to extend in bigger chunks. WARNING: If it's changed, please make sure to change the corresponding value in VDSM (see: https://github.com/oVirt/vdsm/blob/v4.50.1/lib/vdsm/common/config.py.in#L325)!" +VolumeUtilizationChunkInMB.type=Integer +VolumeUtilizationChunkInMB.validValues=1024..4096 # Incremental backup IsIncrementalBackupSupported.description=Enable incremental backup operations for a VM. IsIncrementalBackupSupported.type=Boolean