[PATCH 14/14] Change the default QEMU lock manager to 'lockd'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

The current default QEMU lock manager is the 'nop' lock manager,
which obviously does not perform any locking. The new virtlockd
daemon is able to work out of the box with zero configuration
in single-host only mode. Enable this as the default lock manager
for all QEMU guests

* src/qemu/qemu.conf: Update docs for lock_driver parameter
* src/qemu/qemu_conf.c: Change default lock manager to 'lockd'

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/qemu/qemu.conf                 | 17 ++++++++++-------
 src/qemu/qemu_conf.c               |  2 +-
 src/qemu/test_libvirtd_qemu.aug.in |  2 +-
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index dd853c8..ada18df 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -356,14 +356,17 @@
 #
 #allow_disk_format_probing = 1
 
-
-# To enable 'Sanlock' project based locking of the file
-# content (to prevent two VMs writing to the same
-# disk), uncomment this
+# By default the QEMU driver talks to the 'virtlockd'
+# daemon to acquire exclusive locks for all guest disk
+# images associated with a running VM.
 #
-#lock_manager = "sanlock"
-
-
+# To revert to behaviour of previous releases which did
+# not acquire any locks, set this to 'nop'.
+#
+# To enable use of the external 'sanlock' locking
+# daemon, change this to 'sanlock'.
+#
+#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,
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 4c506a0..1365e70 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -117,7 +117,7 @@ int qemuLoadDriverConfig(virQEMUDriverPtr driver,
     }
 #endif
 
-    if (!(driver->lockManager = virLockManagerPluginNew("nop",
+    if (!(driver->lockManager = virLockManagerPluginNew("lockd",
                                                         "qemu",
                                                         driver->configBaseDir,
                                                         0)))
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 2892204..65fb22d 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -56,7 +56,7 @@ module Test_libvirtd_qemu =
 { "mac_filter" = "1" }
 { "relaxed_acs_check" = "1" }
 { "allow_disk_format_probing" = "1" }
-{ "lock_manager" = "sanlock" }
+{ "lock_manager" = "lockd" }
 { "max_queued" = "0" }
 { "keepalive_interval" = "5" }
 { "keepalive_count" = "5" }
-- 
1.7.11.7

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]