Your message dated Wed, 27 Jun 2012 12:47:13 +0000
with message-id <[email protected]>
and subject line Bug#676345: fixed in libvirt 0.9.13~rc1-1
has caused the Debian Bug report #676345,
regarding libvirt: [Patch] Enable sanlock
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
676345: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676345
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libvirt0
Version: 0.9.12-1.1
Severity: wishlist
File: libvirt

Hi,

please apply the attached patch to enable sanlock in libvirt

Thanks!

Cheers,
David
commit 778f9c0232b916f99174ce4a2a6139090a1495e1
Author: David Weber <[email protected]>
Date:   Mon Jun 4 17:18:39 2012 +0200

    Enable sanlock

diff --git a/debian/changelog b/debian/changelog
index 7d3c5bb..9bbea9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libvirt (0.9.12-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Enable Sanlock
+
+ -- David Weber <[email protected]>  Mon, 04 Jun 2012 16:12:04 +0200
+
 libvirt (0.9.12-1) experimental; urgency=low
 
   * [75e280b] New upstream version 0.9.12
diff --git a/debian/control b/debian/control
index 6092f86..5d5997a 100644
--- a/debian/control
+++ b/debian/control
@@ -33,6 +33,8 @@ Build-Depends: cdbs (>= 0.4.90~),
  libnuma-dev [amd64 i386 ia64 mips mipsel powerpc],
  radvd [linux-any],
  libnetcf-dev [linux-any],
+ libsanlock-dev,
+ libsanlock-client1,
 # For "make check"
  dwarves,
  libxml2-utils,
@@ -95,6 +97,18 @@ Description: library for interfacing with different virtualization systems
  .
  This package contains the debugging symbols.
 
+Package: libvirt-sanlock
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libvirt0 (= ${binary:Version}), augeas-tools
+Priority: extra
+Description: library for interfacing with different virtualization systems
+ Libvirt is a C toolkit to interact with the virtualization capabilities
+ of recent versions of Linux (and other OSes). The library aims at providing
+ a long term stable C API for different virtualization mechanisms. It currently
+ supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ .
+ This package contains the sanlock plugin.
+
 Package: libvirt-doc
 Architecture: all
 Section: doc
diff --git a/debian/libvirt-bin.install b/debian/libvirt-bin.install
index dd9b344..72f23a4 100644
--- a/debian/libvirt-bin.install
+++ b/debian/libvirt-bin.install
@@ -3,7 +3,8 @@ usr/sbin/*
 etc/libvirt/*
 etc/sasl2/*
 usr/share/polkit-1
-usr/lib/libvirt/*
+usr/lib/libvirt/libvirt*
+usr/lib/libvirt/connection-driver
 usr/share/augeas/*
 usr/share/libvirt/*
 usr/share/man/man8/*
diff --git a/debian/libvirt-sanlock.cron.weekly b/debian/libvirt-sanlock.cron.weekly
new file mode 100644
index 0000000..170d91b
--- /dev/null
+++ b/debian/libvirt-sanlock.cron.weekly
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#Disabled by default, uncomment to enable
+exit 0
+
+
+/usr/sbin/virt-sanlock-cleanup -q 2>/dev/null
+exit 0
+
+
diff --git a/debian/libvirt-sanlock.install b/debian/libvirt-sanlock.install
new file mode 100644
index 0000000..d8a7348
--- /dev/null
+++ b/debian/libvirt-sanlock.install
@@ -0,0 +1 @@
+usr/lib/libvirt/lock-driver/sanlock.so
diff --git a/debian/patches/add_ignore_param_to_sanlock.patch b/debian/patches/add_ignore_param_to_sanlock.patch
new file mode 100644
index 0000000..159129e
--- /dev/null
+++ b/debian/patches/add_ignore_param_to_sanlock.patch
@@ -0,0 +1,106 @@
+From b8012ce9312f00947c5ca7250a7a96534c85835f Mon Sep 17 00:00:00 2001
+From: David Weber <[email protected]>
+Date: Mon, 14 May 2012 09:53:02 +0000
+Subject: [PATCH 1/1] sanlock: fix locking for readonly devices
+
+Add ignore param for readonly and shared disk in sanlock
+---
+ AUTHORS                              |    1 +
+ src/locking/libvirt_sanlock.aug      |    1 +
+ src/locking/lock_driver_sanlock.c    |   13 ++++++++++++-
+ src/locking/sanlock.conf             |    7 +++++++
+ src/locking/test_libvirt_sanlock.aug |    2 ++
+ 5 files changed, 23 insertions(+), 1 deletions(-)
+
+diff --git a/src/locking/libvirt_sanlock.aug b/src/locking/libvirt_sanlock.aug
+index 5f5f8a1..d65b002 100644
+--- a/src/locking/libvirt_sanlock.aug
++++ b/src/locking/libvirt_sanlock.aug
+@@ -21,6 +21,7 @@ module Libvirt_sanlock =
+              | bool_entry "auto_disk_leases"
+              | int_entry "host_id"
+              | bool_entry "require_lease_for_disks"
++             | bool_entry "ignore_readonly_and_shared_disks"
+    let comment = [ label "#comment" . del /#[ \t]*/ "# " .  store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
+    let empty = [ label "#empty" . eol ]
+ 
+diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
+index d344d6a..146aefd 100644
+--- a/src/locking/lock_driver_sanlock.c
++++ b/src/locking/lock_driver_sanlock.c
+@@ -1,7 +1,7 @@
+ /*
+  * lock_driver_sanlock.c: A lock driver for Sanlock
+  *
+- * Copyright (C) 2010-2011 Red Hat, Inc.
++ * Copyright (C) 2010-2012 Red Hat, Inc.
+  *
+  * This library is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU Lesser General Public
+@@ -65,6 +65,7 @@ struct _virLockManagerSanlockDriver {
+     bool requireLeaseForDisks;
+     int hostID;
+     bool autoDiskLease;
++    bool ignoreReadonlyShared;
+     char *autoDiskLeasePath;
+ };
+ 
+@@ -114,6 +115,10 @@ static int virLockManagerSanlockLoadConfig(const char *configFile)
+     CHECK_TYPE("auto_disk_leases", VIR_CONF_LONG);
+     if (p) driver->autoDiskLease = p->l;
+ 
++    p = virConfGetValue(conf, "ignore_readonly_and_shared_disks");
++    CHECK_TYPE("ignore_readonly_and_shared_disks", VIR_CONF_LONG);
++    if (p) driver->ignoreReadonlyShared = p->l;
++
+     p = virConfGetValue(conf, "disk_lease_dir");
+     CHECK_TYPE("disk_lease_dir", VIR_CONF_STRING);
+     if (p && p->str) {
+@@ -625,6 +630,12 @@ static int virLockManagerSanlockAddResource(virLockManagerPtr lock,
+         return -1;
+     }
+ 
++    if ((flags & (VIR_LOCK_MANAGER_RESOURCE_READONLY |
++                  VIR_LOCK_MANAGER_RESOURCE_SHARED)) &&
++        driver->ignoreReadonlyShared) {
++            return 0;
++    }
++
+     if (flags & VIR_LOCK_MANAGER_RESOURCE_READONLY) {
+         virLockError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                      _("Readonly leases are not supported"));
+diff --git a/src/locking/sanlock.conf b/src/locking/sanlock.conf
+index efc35ee..19ab2b3 100644
+--- a/src/locking/sanlock.conf
++++ b/src/locking/sanlock.conf
+@@ -52,3 +52,10 @@
+ # to enabled, otherwise it defaults to disabled.
+ #
+ #require_lease_for_disks = 1
++
++#
++# Enable this flag to have sanlock ignore readonly and shared disks.
++# If disabled, then this rejects attempts to share resources until
++# sanlock gains support for shared locks.
++#
++#ignore_readonly_and_shared_disks = 1
+diff --git a/src/locking/test_libvirt_sanlock.aug b/src/locking/test_libvirt_sanlock.aug
+index b5169e1..90ab59f 100644
+--- a/src/locking/test_libvirt_sanlock.aug
++++ b/src/locking/test_libvirt_sanlock.aug
+@@ -4,6 +4,7 @@ module Test_libvirt_sanlock =
+ disk_lease_dir = \"/var/lib/libvirt/sanlock\"
+ host_id = 1
+ require_lease_for_disks = 1
++ignore_readonly_and_shared_disks = 1
+ "
+ 
+    test Libvirt_sanlock.lns get conf =
+@@ -11,3 +12,4 @@ require_lease_for_disks = 1
+ { "disk_lease_dir" = "/var/lib/libvirt/sanlock" }
+ { "host_id" = "1" }
+ { "require_lease_for_disks" = "1" }
++{ "ignore_readonly_and_shared_disks" = "1" }
+-- 
+1.7.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 2081602..cafcc03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ virsh-Initialize-library-before-calling-virResetLast.patch
 Disable-gnulib-s-test-nonplocking-pipe.sh.patch
 Disable-failing-virnetsockettest.patch
 Don-t-fail-if-we-can-t-setup-avahi.patch
+add_ignore_param_to_sanlock.patch

--- End Message ---
--- Begin Message ---
Source: libvirt
Source-Version: 0.9.13~rc1-1

We believe that the bug you reported is fixed in the latest version of
libvirt, which is due to be installed in the Debian FTP archive:

libvirt-bin_0.9.13~rc1-1_i386.deb
  to main/libv/libvirt/libvirt-bin_0.9.13~rc1-1_i386.deb
libvirt-dev_0.9.13~rc1-1_i386.deb
  to main/libv/libvirt/libvirt-dev_0.9.13~rc1-1_i386.deb
libvirt-doc_0.9.13~rc1-1_all.deb
  to main/libv/libvirt/libvirt-doc_0.9.13~rc1-1_all.deb
libvirt-sanlock_0.9.13~rc1-1_i386.deb
  to main/libv/libvirt/libvirt-sanlock_0.9.13~rc1-1_i386.deb
libvirt0-dbg_0.9.13~rc1-1_i386.deb
  to main/libv/libvirt/libvirt0-dbg_0.9.13~rc1-1_i386.deb
libvirt0_0.9.13~rc1-1_i386.deb
  to main/libv/libvirt/libvirt0_0.9.13~rc1-1_i386.deb
libvirt_0.9.13~rc1-1.debian.tar.gz
  to main/libv/libvirt/libvirt_0.9.13~rc1-1.debian.tar.gz
libvirt_0.9.13~rc1-1.dsc
  to main/libv/libvirt/libvirt_0.9.13~rc1-1.dsc
libvirt_0.9.13~rc1.orig.tar.gz
  to main/libv/libvirt/libvirt_0.9.13~rc1.orig.tar.gz
python-libvirt_0.9.13~rc1-1_i386.deb
  to main/libv/libvirt/python-libvirt_0.9.13~rc1-1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Günther <[email protected]> (supplier of updated libvirt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 26 Jun 2012 15:29:27 +0200
Source: libvirt
Binary: libvirt-bin libvirt0 libvirt0-dbg libvirt-doc libvirt-dev 
python-libvirt libvirt-sanlock
Architecture: source all i386
Version: 0.9.13~rc1-1
Distribution: experimental
Urgency: low
Maintainer: Debian Libvirt Maintainers 
<[email protected]>
Changed-By: Guido Günther <[email protected]>
Description: 
 libvirt-bin - programs for the libvirt library
 libvirt-dev - development files for the libvirt library
 libvirt-doc - documentation for the libvirt library
 libvirt-sanlock - library for interfacing with different virtualization systems
 libvirt0   - library for interfacing with different virtualization systems
 libvirt0-dbg - library for interfacing with different virtualization systems
 python-libvirt - libvirt Python bindings
Closes: 676345
Changes: 
 libvirt (0.9.13~rc1-1) experimental; urgency=low
 .
   * [9deae39] New upstream version 0.9.13~rc1
   * [487acd7] Drop Include-stdint.h-for-uint32_t.patch fixed upstream
   * [ab7be10] Drop Only-check-for-cluster-fs-if-we-re-using-a-filesyste.patch
     applied upstream
   * [385bac4] Rebase remaining patches
   * [cb0d1f7] Update symbol versions
   * [c2bd465] Remove *.la files generated for dynamically loaded modules
   * [e4714b7] Add sanlock support.
     Thanks to David Weber (Closes: #676345)
   * [5f715ed] Install systemd init scripts on Linux
Checksums-Sha1: 
 683d30b92121465b1ec94d031d7df20d53c780c4 2381 libvirt_0.9.13~rc1-1.dsc
 d5321cca893dfbcec51c6c7337ac06347f885c3a 20228238 
libvirt_0.9.13~rc1.orig.tar.gz
 14d6d42d13399e12ab0744c8a15e134a7a370fef 35521 
libvirt_0.9.13~rc1-1.debian.tar.gz
 04f10197b3e74235dd718a710a1a04c4c9b67815 2236082 
libvirt-doc_0.9.13~rc1-1_all.deb
 676838d761d4bb8fae315e514b211fb592eab104 3772914 
libvirt-bin_0.9.13~rc1-1_i386.deb
 4957631909771dccb2f969eefa78bf125347221f 2102284 libvirt0_0.9.13~rc1-1_i386.deb
 59db1bf62baed9f98adc821452a3ae31394e0fc8 8322522 
libvirt0-dbg_0.9.13~rc1-1_i386.deb
 240ed4a6b1d61d933929f3648170652b99d2a8e9 2451010 
libvirt-dev_0.9.13~rc1-1_i386.deb
 0d210350aa102ab480ad6c141ab9bd77351f7d22 1471898 
python-libvirt_0.9.13~rc1-1_i386.deb
 72184eba461591b8b0cf4d21d2a901497dd1e524 1193000 
libvirt-sanlock_0.9.13~rc1-1_i386.deb
Checksums-Sha256: 
 62f2605f2d60aa08a53e539ffdcb42116c5255a74375e4ebb682142b5f22c689 2381 
libvirt_0.9.13~rc1-1.dsc
 c00673e87bfc576d5b05c1cc6a1f606fbf54fbab5ba857a6d288884d947cdaf9 20228238 
libvirt_0.9.13~rc1.orig.tar.gz
 33985c60623195ac07576a589b73843c077d1c25f2fd325915917a027268f06e 35521 
libvirt_0.9.13~rc1-1.debian.tar.gz
 87e4b1923c82d718e7e12941b77537dde1d9f3fa56986e35efafedce9503d796 2236082 
libvirt-doc_0.9.13~rc1-1_all.deb
 37aaf61a871bba0a48b5dcd8058974d6308cc8bd1683960eb858d1208e5c4e6e 3772914 
libvirt-bin_0.9.13~rc1-1_i386.deb
 26625f29c5c4e276a1f6cbf45a091338232b94a658895eead133f319ddb53d63 2102284 
libvirt0_0.9.13~rc1-1_i386.deb
 8ffb2c506eb0eca71c0b3dc99b0d31bff98de6bb5712cfff9bdf00a291d84945 8322522 
libvirt0-dbg_0.9.13~rc1-1_i386.deb
 7b91d5f6cca234aaeffae508a3415a5480f5a4c83afc6eff0cd2a5781b417c78 2451010 
libvirt-dev_0.9.13~rc1-1_i386.deb
 df11fe862715f6004236d5cb6003db3fc533c853470a514f58433e3c523bb925 1471898 
python-libvirt_0.9.13~rc1-1_i386.deb
 a8da80cff3fdae519e8fd9489fcf8c9f077c7bd8b5f5a182fd7527a6d8017e53 1193000 
libvirt-sanlock_0.9.13~rc1-1_i386.deb
Files: 
 1fc77270348ba3edc6f4fc8b322b497b 2381 libs optional libvirt_0.9.13~rc1-1.dsc
 e4b13de31dcae435a10d1c454bacb133 20228238 libs optional 
libvirt_0.9.13~rc1.orig.tar.gz
 e2fbd4d86024e5830cfa8961583ff242 35521 libs optional 
libvirt_0.9.13~rc1-1.debian.tar.gz
 f8d2d1fc7c24a3b2bb8e81dc8be4adbe 2236082 doc optional 
libvirt-doc_0.9.13~rc1-1_all.deb
 6ac4a1823721b54dc6771ddcf76b94e8 3772914 admin optional 
libvirt-bin_0.9.13~rc1-1_i386.deb
 f8bcba2b5fbae7b6ed40d3a14a8183be 2102284 libs optional 
libvirt0_0.9.13~rc1-1_i386.deb
 1910ad3440e1403ef60d7b0b70041220 8322522 debug extra 
libvirt0-dbg_0.9.13~rc1-1_i386.deb
 c93d746c9a1e341a6b22d7f23273dd18 2451010 libdevel optional 
libvirt-dev_0.9.13~rc1-1_i386.deb
 2dd6a2fcc589bb4873969a8c77dd8d9a 1471898 python optional 
python-libvirt_0.9.13~rc1-1_i386.deb
 a11fb5385a01f8f3068729af27e065f1 1193000 libs extra 
libvirt-sanlock_0.9.13~rc1-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iD8DBQFP6caCn88szT8+ZCYRAsxZAJ9ov5Huc2+ps50IiwXldrpXajbhrgCeONPz
inUg1akvZomi///Pt6WHdOU=
=o/c+
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to