Skip to content

Commit 5675529

Browse files
slavkaprohityadavcloud
authored andcommitted
Extract the IO_URING configuration into the agent.properties (apache#6253)
When using advanced virtualization the IO Driver is not supported. The admin will decide if want to enable/disable this configuration from agent.properties file. The default value is true (cherry picked from commit 42a92dc) Signed-off-by: Rohit Yadav <[email protected]>
1 parent 769ed8f commit 5675529

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

agent/conf/agent.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,6 @@ iscsi.session.cleanup.enabled=false
285285

286286
# Enable manually setting CPU's topology on KVM's VM.
287287
# enable.manually.setting.cpu.topology.on.kvm.vm=true
288+
289+
# Enable/disable IO driver for Qemu / It's enabled by default on KVM agents
290+
# enable.io.uring=true

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public class AgentProperties{
5454
*/
5555
public static final Property<Boolean> ENABLE_MANUALLY_SETTING_CPU_TOPOLOGY_ON_KVM_VM = new Property<Boolean>("enable.manually.setting.cpu.topology.on.kvm.vm", true);
5656

57+
/**
58+
* Enable manually IO driver on KVM's VM. <br>
59+
* Data type: boolean.<br>
60+
* Default value: true.
61+
*/
62+
public static final Property<Boolean> ENABLE_IO_URING = new Property<Boolean>("enable.io.uring", true);
63+
5764
public static class Property <T>{
5865
private final String name;
5966
private final T defaultValue;

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2956,7 +2956,9 @@ private KVMPhysicalDisk getPhysicalDiskPrimaryStore(PrimaryDataStoreTO primaryDa
29562956
* (ii) Libvirt >= 6.3.0
29572957
*/
29582958
protected void setDiskIoDriver(DiskDef disk) {
2959-
if (getHypervisorLibvirtVersion() >= HYPERVISOR_LIBVIRT_VERSION_SUPPORTS_IO_URING && getHypervisorQemuVersion() >= HYPERVISOR_QEMU_VERSION_SUPPORTS_IO_URING) {
2959+
if (getHypervisorLibvirtVersion() >= HYPERVISOR_LIBVIRT_VERSION_SUPPORTS_IO_URING
2960+
&& getHypervisorQemuVersion() >= HYPERVISOR_QEMU_VERSION_SUPPORTS_IO_URING
2961+
&& AgentPropertiesFileHandler.getPropertyValue(AgentProperties.ENABLE_IO_URING)) {
29602962
disk.setIoDriver(DiskDef.IoDriver.IOURING);
29612963
}
29622964
}

0 commit comments

Comments
 (0)