[PATCH 13/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'
---
 src/qemu/qemu.conf   |   16 +++++++++++-----
 src/qemu/qemu_conf.c |    2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 2c50d9d..a8c1c87 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -281,9 +281,15 @@
 #
 # max_processes = 0
 
-# To enable strict 'fcntl' based locking of the file
-# content (to prevent two VMs writing to the same
-# disk), start the 'virtlockd' service, and uncomment
-# this
 #
-# lock_manager = "fcntl"
+# By default the QEMU driver talks to the 'virtlockd'
+# daemon to acquire exclusive locks for all guest disk
+# images associated with a running VM.
+#
+# 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"
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 3d8aba4..1baa37e 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -116,7 +116,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
 #endif
 
     if (!(driver->lockManager =
-          virLockManagerPluginNew("nop", NULL, 0)))
+          virLockManagerPluginNew("lockd", NULL, 0)))
         return -1;
 
     /* Just check the file is readable before opening it, otherwise
-- 
1.7.6

--
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]