From 27bc4a46faebc543adf29040bfe5a0ff485d61dd Mon Sep 17 00:00:00 2001 From: Hinrikus Wolf <hinrikus@fsmpi.rwth-aachen.de> Date: Mon, 7 May 2018 20:17:50 +0200 Subject: [PATCH] add patch for rbd cache support --- README.md | 14 ++++++++++++++ add_rbd_cache_support.patch | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 add_rbd_cache_support.patch diff --git a/README.md b/README.md index 2886b8e..ce80f88 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,13 @@ It boils down to the following steps: At least according to my zsh history. +If you are building from an already changed version, but without that particular changelog, use: + +- `dch --auto-nmr --newversion $newversion` + +Ideally, you copy the old changelog to the new one. Look up the old version number! +Add "Non-maintainer upload." manually to your list of changes. + ## Patch Details @@ -51,3 +58,10 @@ Removes block devices from lists of mirrored and movable devices. This prevents This may not solve the general case, but is makes it compatible with our usage. + +### `add_rbd_cache_support.patch` + +Add caching support for rbd devices. This was disabled for arbritrary external storage. +But this does not make sense for rbd. + + diff --git a/add_rbd_cache_support.patch b/add_rbd_cache_support.patch new file mode 100644 index 0000000..71593be --- /dev/null +++ b/add_rbd_cache_support.patch @@ -0,0 +1,20 @@ +Index: ganeti-2.15.2/lib/hypervisor/hv_kvm/__init__.py +=================================================================== +--- ganeti-2.15.2.orig/lib/hypervisor/hv_kvm/__init__.py ++++ ganeti-2.15.2/lib/hypervisor/hv_kvm/__init__.py +@@ -921,12 +921,13 @@ class KVMHypervisor(hv_base.BaseHypervis + disk_cache = up_hvp[constants.HV_DISK_CACHE] + for cfdev, link_name, uri in kvm_disks: + if cfdev.dev_type in constants.DTS_EXT_MIRROR: +- if disk_cache != "none": ++ if disk_cache != "none" and cfdev.dev_type != "rbd": + # TODO: make this a hard error, instead of a silent overwrite + logging.warning("KVM: overriding disk_cache setting '%s' with 'none'" + " to prevent shared storage corruption on migration", + disk_cache) +- cache_val = ",cache=none" ++ disk_cache = "none" ++ cache_val = ",cache=%s" % disk_cache + elif disk_cache != constants.HT_CACHE_DEFAULT: + cache_val = ",cache=%s" % disk_cache + else: -- GitLab