nvazquez commented on code in PR #6399:
URL: https://github.com/apache/cloudstack/pull/6399#discussion_r877322548


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -2949,6 +2949,23 @@ private KVMPhysicalDisk 
getPhysicalDiskPrimaryStore(PrimaryDataStoreTO primaryDa
         return storagePool.getPhysicalDisk(data.getPath());
     }
 
+    /**
+     * Check if IO_URING is supported by qemu
+     */
+    protected boolean isIoUringSupportedByQemu() {
+        s_logger.debug("Checking if iouring is supported");
+        String hostOsKey = "Host.OS";
+        Map<String, String> versionStrings = getVersionStrings();
+        if (MapUtils.isEmpty(versionStrings) || 
!versionStrings.containsKey(hostOsKey)) {
+            return false;
+        }
+        String os = versionStrings.get(hostOsKey);
+        String qemuBinary = os.equalsIgnoreCase("ubuntu") ? 
"/usr/bin/qemu-system-x86_64" : "/usr/libexec/qemu-kvm";

Review Comment:
   @weizhouapache I have been testing on ubuntu20 and it seems like the check 
does not pass, so I have refactored it to be enabled by default on ubuntu: cc 
@wido @GabrielBrascher @slavkap 
   ````
   # /usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh
   Host.OS=Ubuntu
   Host.OS.Version=20.04
   Host.OS.Kernel.Version=5.9.0-050900-generic
   # ldd /usr/bin/qemu-system-x86_64 | grep -i uring
   # /usr/bin/qemu-system-x86_64 -drive aio=uring
   Unable to init server: Could not connect: Connection refused
   qemu-system-x86_64: -drive aio=uring: invalid aio option
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to