[libvirt] [PATCH for 4.8.0] qemu: Temporarily disable metadata locking

Michal Privoznik posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/ff5ce622f6f869d111e00abda2b7515801fa0a3b.1538053843.git.mprivozn@redhat.com
src/qemu/libvirtd_qemu.aug         |  1 -
src/qemu/qemu.conf                 |  9 ---------
src/qemu/qemu_conf.c               | 11 -----------
src/qemu/test_libvirtd_qemu.aug.in |  1 -
4 files changed, 22 deletions(-)
[libvirt] [PATCH for 4.8.0] qemu: Temporarily disable metadata locking
Posted by Michal Privoznik 5 years, 7 months ago
Turns out, there are couple of bugs that prevent this feature
from being operational. Given how close to the release we are
disable the feature temporarily. Hopefully, it can be enabled
back after all the bugs are fixed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

There are two major problems:

1) when using regular locking the lockspace code gets confused and
starting domain is denied after hitting 60 second timeout.

2) the virtlockd connection FD might leak into children process
resulting in sudden killing of libvirtd.

I posted a patch for 2), and I'm working on patch for 1).

 src/qemu/libvirtd_qemu.aug         |  1 -
 src/qemu/qemu.conf                 |  9 ---------
 src/qemu/qemu_conf.c               | 11 -----------
 src/qemu/test_libvirtd_qemu.aug.in |  1 -
 4 files changed, 22 deletions(-)

diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index 42e325d4fb..ddc4bbfd1d 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -98,7 +98,6 @@ module Libvirtd_qemu =
                  | bool_entry "relaxed_acs_check"
                  | bool_entry "allow_disk_format_probing"
                  | str_entry "lock_manager"
-                 | str_entry "metadata_lock_manager"
 
    let rpc_entry = int_entry "max_queued"
                  | int_entry "keepalive_interval"
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 84492719c4..8391332cb4 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -659,15 +659,6 @@
 #lock_manager = "lockd"
 
 
-# To serialize two or more daemons trying to change metadata on a
-# file (e.g. a file on NFS share), libvirt offers a locking
-# mechanism. Currently, only "lockd" is supported (or no locking
-# at all if unset). Note that this is independent of lock_manager
-# described above.
-#
-#metadata_lock_manager = "lockd"
-
-
 # Set limit of maximum APIs queued on one domain. All other APIs
 # over this threshold will fail on acquiring job lock. Specially,
 # setting to zero turns this feature off.
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 33508174cb..fc84186a7e 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -838,17 +838,6 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
     if (virConfGetValueString(conf, "lock_manager", &cfg->lockManagerName) < 0)
         goto cleanup;
 
-    if (virConfGetValueString(conf, "metadata_lock_manager",
-                              &cfg->metadataLockManagerName) < 0)
-        goto cleanup;
-    if (cfg->metadataLockManagerName &&
-        STRNEQ(cfg->metadataLockManagerName, "lockd")) {
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unknown metadata lock manager name %s"),
-                       cfg->metadataLockManagerName);
-        goto cleanup;
-    }
-
     if (virConfGetValueString(conf, "stdio_handler", &stdioHandler) < 0)
         goto cleanup;
     if (stdioHandler) {
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 451e73126e..f1e8806ad2 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -81,7 +81,6 @@ module Test_libvirtd_qemu =
 { "mac_filter" = "1" }
 { "relaxed_acs_check" = "1" }
 { "lock_manager" = "lockd" }
-{ "metadata_lock_manager" = "lockd" }
 { "max_queued" = "0" }
 { "keepalive_interval" = "5" }
 { "keepalive_count" = "5" }
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH for 4.8.0] qemu: Temporarily disable metadata locking
Posted by Jiri Denemark 5 years, 7 months ago
On Thu, Sep 27, 2018 at 15:14:49 +0200, Michal Privoznik wrote:
> Turns out, there are couple of bugs that prevent this feature
> from being operational. Given how close to the release we are
> disable the feature temporarily. Hopefully, it can be enabled
> back after all the bugs are fixed.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list