[Pkg-ganeti-devel] Bug#881255: ganeti-2.15: Force cache=none for KVM when aio=native

Alexandros Kosiaris akosiaris at gmail.com
Thu Nov 9 12:50:10 UTC 2017


Package: ganeti-2.15
Severity: normal
Tags: upstream patch

Dear Maintainer,

Starting with version 2.6, QEMU will fail to start with an error when
aio=native and no cache=none is present. This is documented in
http://wiki.qemu.org/ChangeLog/2.6. QEMU has been complaining about this
since 2.3.

Attached is a patch that detects this in the hypervisor setup and force
the disk_cache setting, logging it at the same time. The patch verbatim
taken from https://github.com/ganeti/ganeti/commit/1e510ccd092f472919a9f8b34ede838476ab7e2e.patch

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ganeti-2.15 depends on:
ii  adduser                3.115
ii  bridge-utils           1.5-13+deb9u1
ii  debconf [debconf-2.0]  1.5.61
pn  fping                  <none>
ii  iproute                1:4.9.0-1
ii  iproute2               4.9.0-1
ii  iputils-arping         3:20161105-1
ii  lvm2                   2.02.168-2
ii  openssh-client         1:7.4p1-10+deb9u1
pn  openssh-server         <none>
ii  openssl                1.1.0f-3
ii  python                 2.7.13-2
pn  python-bitarray        <none>
pn  python-fdsend          <none>
pn  python-ipaddr          <none>
ii  python-openssl         16.2.0-1
ii  python-paramiko        2.0.0-1
pn  python-psutil          <none>
ii  python-pycurl          7.43.0-2
pn  python-pyinotify       <none>
ii  python-pyparsing       2.1.10+dfsg1-1
ii  python-simplejson      3.10.0-1
ii  socat                  1.7.3.1-2+deb9u1

ganeti-2.15 recommends no packages.

ganeti-2.15 suggests no packages.
-------------- next part --------------
>From 1e510ccd092f472919a9f8b34ede838476ab7e2e Mon Sep 17 00:00:00 2001
From: Alexandros Kosiaris <akosiaris at gmail.com>
Date: Thu, 1 Jun 2017 12:53:05 +0300
Subject: [PATCH] Force cache=none for KVM when aio=native (#43)

Starting with version 2.6, QEMU will fail to start with an error when
aio=native and no cache=none is present. This is documented in
http://wiki.qemu.org/ChangeLog/2.6. QEMU has been complaining about this
since 2.3. Detect this in the hypervisor setup and force the disk_cache
setting, logging it at the same time.

Signed-off-by: Alexandros Kosiaris <akosiaris at gmail.com>
Reviewed-by: Federico Morg Pareschi <morg at google.com>
---
 lib/hypervisor/hv_kvm/__init__.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/hypervisor/hv_kvm/__init__.py b/lib/hypervisor/hv_kvm/__init__.py
index 15f75ef48..d483808d6 100644
--- a/lib/hypervisor/hv_kvm/__init__.py
+++ b/lib/hypervisor/hv_kvm/__init__.py
@@ -1123,6 +1123,12 @@ def _GenerateKVMBlockDevicesOptions(self, up_hvp, kvm_disks,
                           " to prevent shared storage corruption on migration",
                           disk_cache)
         cache_val = ",cache=none"
+      elif aio_mode == constants.HT_KVM_AIO_NATIVE and disk_cache != "none":
+        # TODO: make this a hard error, instead of a silent overwrite
+        logging.warning("KVM: overriding disk_cache setting '%s' with 'none'"
+                        " to prevent QEMU failures in version 2.6+",
+                        disk_cache)
+        cache_val = ",cache=none"
       elif disk_cache != constants.HT_CACHE_DEFAULT:
         cache_val = ",cache=%s" % disk_cache
       else:


More information about the Pkg-ganeti-devel mailing list