]> git.proxmox.com Git - lvm.git/commitdiff
disable clvmd startup by default
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 25 Nov 2011 07:50:40 +0000 (08:50 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 25 Nov 2011 07:50:40 +0000 (08:50 +0100)
Makefile
patchdir/autodetect-locking-type.patch
patchdir/fix-changelog.patch
patchdir/fix-clvm-init-script.patch
patchdir/fix-libdevmapper-priority.patch [new file with mode: 0644]
patchdir/series
patchdir/suppress-error-messages.patch [new file with mode: 0644]

index a8202b1e422d4e3409c26fc5a11fc55c83891393..2ec39bb187ce40d3f92f6d1169c788a63fc3c90c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ LVMVERSION=2.02.86
 DMVERSION=1.02.65
 DEBRELEASE=1
 # also update debian changelog patch
-PVERELEASE=${DEBRELEASE}pve1
+PVERELEASE=${DEBRELEASE}pve2
 PVEVER=${LVMVERSION}-${PVERELEASE}
 DMVER=${DMVERSION}-${PVERELEASE}
 
index 2494085b380db05968495a67695e42743b708911..bb4edeff954c39a25e795586127b7de6699c7bc3 100644 (file)
@@ -42,32 +42,3 @@ Index: new/doc/example.conf.in
  
      # Set to 0 to fail when a lock request cannot be satisfied immediately.
      wait_for_locks = 1
-Index: new/lib/locking/cluster_locking.c
-===================================================================
---- new.orig/lib/locking/cluster_locking.c     2011-09-21 10:08:21.000000000 +0200
-+++ new/lib/locking/cluster_locking.c  2011-09-21 10:10:55.000000000 +0200
-@@ -66,10 +66,14 @@
- {
-       int local_socket;
-       struct sockaddr_un sockaddr;
-+      int suppress_messages = 0;
-+
-+      if (ignorelockingfailure() && getenv("LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES"))
-+              suppress_messages = 1;
-       /* Open local socket */
-       if ((local_socket = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
--              log_error("Local socket creation failed: %s", strerror(errno));
-+              log_error_suppress(suppress_messages, "Local socket creation failed: %s", strerror(errno));
-               return -1;
-       }
-@@ -82,7 +86,7 @@
-                   sizeof(sockaddr))) {
-               int saved_errno = errno;
--              log_error("connect() failed on local socket: %s",
-+              log_error_suppress(suppress_messages, "connect() failed on local socket: %s",
-                         strerror(errno));
-               if (close(local_socket))
-                       stack;
index 5d2e4f48f49a153ce6799bf6878fbc4a7a9bcc36..ce2ce87d4219ef601f6ae461583e85bd81d5355f 100644 (file)
@@ -1,14 +1,76 @@
 Index: new/debian/changelog
 ===================================================================
---- new.orig/debian/changelog  2011-09-20 12:49:41.000000000 +0200
-+++ new/debian/changelog       2011-09-20 12:53:25.000000000 +0200
-@@ -1,3 +1,9 @@
+--- new.orig/debian/changelog  2011-11-25 08:39:04.000000000 +0100
++++ new/debian/changelog       2011-11-25 08:46:06.000000000 +0100
+@@ -1,3 +1,17 @@
++lvm2 (2.02.86-1pve2) unstable; urgency=low
++
++  * disable clvmd by default
++
++  * do not set locking type automatically
++
++ -- Proxmox Support Team <support@proxmox.com>  Fri, 25 Nov 2011 08:45:28 +0100
++
 +lvm2 (2.02.86-1pve1) unstable; urgency=low
-+  
++
 +  * backport to squeeze for use with Proxmox VE
-+  
++
 + -- Proxmox Support Team <support@proxmox.com>  Tue, 20 Sep 2011 12:53:25 +0200
-+  
++
  lvm2 (2.02.86-1) unstable; urgency=low
  
    * New upstream version.
+@@ -56,7 +70,7 @@
+   * Import upstream version 2.02.72:
+     - CVE-2010-2526: Fix insecure communication between lvm2 and clvmd.
+-     (Closes: #591204)          
++     (Closes: #591204)
+     - Only use single node clvm if explicitly requested.
+  -- Bastian Blank <waldi@debian.org>  Thu, 19 Aug 2010 14:44:02 +0200
+@@ -523,7 +537,7 @@
+   * Don't make /lib/lvm2 the default library directory as it causes initrd
+     troubles.
+     Closes: #287042
+-  
++
+  -- Patrick Caulfield <patrick@debian.org>  Fri, 24 Dec 2004 12:27:05 +0000
+ lvm2 (2.00.31-1) unstable; urgency=low
+@@ -551,7 +565,7 @@
+   * Remove "is not recommended for production use" from package description.
+     Closes: #278919
+   * Add lvm2create_initrd to documentation directory.
+-  
++
+  -- Patrick Caulfield <patrick@debian.org>  Wed,  3 Nov 2004 09:37:56 +0000
+ lvm2 (2.00.24-2) unstable; urgency=low
+@@ -596,7 +610,7 @@
+     Closes: #260700
+   * Add Czech debconf translation
+     Closes: #265545
+-  
++
+  -- Patrick Caulfield <patrick@debian.org>  Fri, 20 Aug 2004 10:44:11 +0100
+ lvm2 (2.00.19-3) unstable; urgency=low
+@@ -736,7 +750,7 @@
+  -- Andres Salomon <dilinger@voxel.net>  Thu, 07 Aug 2003 01:04:59 -0400
+ lvm2 (1.95.15-2) unstable; urgency=low
+-  
++
+   * Calm-before-the-storm release; the next one will either be 2.00 (once
+     the kill-yer-VGs bug is fixed) or 1.95 with lvm10 compatibility (once
+     patrick returns from vacation).
+@@ -812,7 +826,7 @@
+   * Add dmsetup as a suggestion.
+   * Add /etc/lvm/lvm.conf conffile.
+   * Add undocumented(7) for the commands missing manpages.
+-  
++
+  -- Andres Salomon <dilinger@mp3revolution.net>  Mon,  4 Mar 2002 04:51:26 -0500
+ lvm2 (0.95.02cvs20020220) unstable; urgency=low
index 641f99859e0f70d40e0f4df56a7d6d9e2cfc0792..d8ea94bd5271c829d3f1d71f21ef5c92b862d249 100644 (file)
@@ -1,7 +1,7 @@
 Index: new/debian/clvm.init
 ===================================================================
---- new.orig/debian/clvm.init  2011-09-21 11:08:28.000000000 +0200
-+++ new/debian/clvm.init       2011-09-21 11:22:15.000000000 +0200
+--- new.orig/debian/clvm.init  2011-11-25 08:39:04.000000000 +0100
++++ new/debian/clvm.init       2011-11-25 08:42:54.000000000 +0100
 @@ -4,8 +4,8 @@
  # Provides:          clvm
  # Required-Start:    $remote_fs lvm2 cman
@@ -13,8 +13,36 @@ Index: new/debian/clvm.init
  # Short-Description: start and stop the lvm cluster locking daemon
  ### END INIT INFO
  #
-@@ -44,10 +44,10 @@
+@@ -26,28 +26,31 @@
+ . /lib/lsb/init-functions
  
+ if [ ! -f /etc/cluster/cluster.conf ]; then
+-      log_failure_msg "clvmd: cluster not configured. Aborting."
++        log_action_msg "clvmd: cluster not configured"
+       exit 0
+ fi
+-if ! cman_tool status >/dev/null 2>&1; then
+-      log_failure_msg "clvmd: cluster is not running. Aborting."
+-      exit 0
+-fi
+-
+-CLVMDTIMEOUT=20
++CLVMDTIMEOUT=30
++START_CLVM=no
+ # Read configuration variable file if it is present
+ [ -r /etc/default/$NAME ] && . /etc/default/$NAME
++[ "$START_CLVM" = "yes" ] || exit 0
++
+ DAEMON_OPTS="-T$CLVMDTIMEOUT"
++if ! cman_tool status >/dev/null 2>&1; then
++      log_failure_msg "clvmd: cluster is not running. Aborting."
++      exit 1
++fi
++
  do_start()
  {
 -      start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS || status="$?"
@@ -26,6 +54,16 @@ Index: new/debian/clvm.init
  }
  
  do_activate()
+@@ -55,9 +58,6 @@
+       if [ -n "$LVM_VGS" ] ; then
+               log_action_msg  "Activating VGs $LVM_VGS"
+               vgchange -ayl $LVM_VGS || return $?
+-      else
+-              log_action_msg  "Activating all VGs"
+-              vgchange -ayl || return $?
+       fi
+ }
 @@ -91,7 +91,7 @@
                case "$status" in
                        0) log_end_msg 0 ;;
@@ -48,8 +86,8 @@ Index: new/debian/clvm.init
                do_deactivate
 Index: new/debian/rules
 ===================================================================
---- new.orig/debian/rules      2011-09-21 11:08:28.000000000 +0200
-+++ new/debian/rules   2011-09-21 11:08:51.000000000 +0200
+--- new.orig/debian/rules      2011-11-25 08:39:04.000000000 +0100
++++ new/debian/rules   2011-11-25 08:39:39.000000000 +0100
 @@ -160,7 +160,7 @@
  install_clvm: DIR = $(BUILD_DIR)/install_deb
  install_clvm: $(STAMPS_DIR)/install_deb
@@ -59,3 +97,20 @@ Index: new/debian/rules
        +$(MAKE_SELF) install-base
  
  install_dmsetup: export DH_OPTIONS = -pdmsetup
+Index: new/debian/clvm.default
+===================================================================
+--- new.orig/debian/clvm.default       2011-11-25 08:39:04.000000000 +0100
++++ new/debian/clvm.default    2011-11-25 08:42:26.000000000 +0100
+@@ -1,8 +1,11 @@
+ # Bourne shell compatible script, sourced by /etc/init.d/clvm to set
+ # additional arguments for clvmd.
++# enable clmvd
++#START_CLVM=yes
++
+ # Startup timeout: 
+-CLVMDTIMEOUT=20
++#CLVMDTIMEOUT=30
+ # Volume groups to activate on startup:
+ # LVM_VGS="cluster_vg1 cluster_vg2"
diff --git a/patchdir/fix-libdevmapper-priority.patch b/patchdir/fix-libdevmapper-priority.patch
new file mode 100644 (file)
index 0000000..ff50ae0
--- /dev/null
@@ -0,0 +1,13 @@
+Index: new/debian/control
+===================================================================
+--- new.orig/debian/control    2011-09-22 10:21:22.000000000 +0200
++++ new/debian/control 2011-09-22 10:21:53.000000000 +0200
+@@ -47,7 +47,7 @@
+ Package: libdevmapper1.02.1
+ Section: libs
+-Priority: required
++Priority: optional
+ Architecture: any
+ Depends: ${shlibs:Depends}, ${misc:Depends}, dmsetup (>= ${binary:Version})
+ Breaks: lvm2 (<< 2.02.66)
index 564f48e038bf81c451c21ee6ec6905df30fd175d..f88fe5419b3eefffd6944b795b59449654bcab9f 100644 (file)
@@ -3,5 +3,7 @@ fix-clvm-init-script.patch
 fix-changelog.patch
 fix-fsadm-install.patch
 remove-udebs.patch
-autodetect-locking-type.patch
+#autodetect-locking-type.patch
+suppress-error-messages.patch
 fix-lvm2-init-script-patch
+fix-libdevmapper-priority.patch
diff --git a/patchdir/suppress-error-messages.patch b/patchdir/suppress-error-messages.patch
new file mode 100644 (file)
index 0000000..91eaac2
--- /dev/null
@@ -0,0 +1,29 @@
+Index: new/lib/locking/cluster_locking.c
+===================================================================
+--- new.orig/lib/locking/cluster_locking.c     2011-09-21 10:08:21.000000000 +0200
++++ new/lib/locking/cluster_locking.c  2011-09-21 10:10:55.000000000 +0200
+@@ -66,10 +66,14 @@
+ {
+       int local_socket;
+       struct sockaddr_un sockaddr;
++      int suppress_messages = 0;
++
++      if (ignorelockingfailure() && getenv("LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES"))
++              suppress_messages = 1;
+       /* Open local socket */
+       if ((local_socket = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
+-              log_error("Local socket creation failed: %s", strerror(errno));
++              log_error_suppress(suppress_messages, "Local socket creation failed: %s", strerror(errno));
+               return -1;
+       }
+@@ -82,7 +86,7 @@
+                   sizeof(sockaddr))) {
+               int saved_errno = errno;
+-              log_error("connect() failed on local socket: %s",
++              log_error_suppress(suppress_messages, "connect() failed on local socket: %s",
+                         strerror(errno));
+               if (close(local_socket))
+                       stack;