[pve-devel] [PATCH 2/2] gfs2-utils: Fixed patches for updated GFS2 in PVE3.4

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Aug 4 16:06:09 CEST 2015


Removed old, for the actual gfs2 version (3.1.8), unnecessary patch.
Do not throw an error when no GFS2 entry is in /etc/fstab, because
there cannot possible be an entry after the first installation and it's
very confusing to get an error at this point. A info message should be
enough. Using gfs2-utils.git tag 3.1.8 for this build

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 debian/patches/0001-Ported-to-pve-cluster.patch |   53 +++++++++++++++++++++
 debian/patches/fix-gfs-init.d-scripts.patch     |   58 -----------------------
 debian/patches/series                           |    2 +-
 3 files changed, 54 insertions(+), 59 deletions(-)
 create mode 100644 debian/patches/0001-Ported-to-pve-cluster.patch
 delete mode 100644 debian/patches/fix-gfs-init.d-scripts.patch

diff --git a/debian/patches/0001-Ported-to-pve-cluster.patch b/debian/patches/0001-Ported-to-pve-cluster.patch
new file mode 100644
index 0000000..96845d6
--- /dev/null
+++ b/debian/patches/0001-Ported-to-pve-cluster.patch
@@ -0,0 +1,53 @@
+From 3d5b1b17b7bee4962b8e5d20949b3b6ed148d6f8 Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht at proxmox.com>
+Date: Tue, 4 Aug 2015 14:28:14 +0200
+Subject: [PATCH] Ported to pve-cluster
+
+Porting gfs-utils to the PVE
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
+---
+ gfs2/init.d/gfs2              |    6 +++---
+ gfs2/scripts/gfs2_lockcapture |    2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gfs2/init.d/gfs2 b/gfs2/init.d/gfs2
+index 467f37b..9859037 100644
+--- a/gfs2/init.d/gfs2
++++ b/gfs2/init.d/gfs2
+@@ -7,8 +7,8 @@
+ 
+ ### BEGIN INIT INFO
+ # Provides:		gfs2
+-# Required-Start:	$network cman gfs_controld
+-# Required-Stop:	$network cman gfs_controld
++# Required-Start:	$network pve-cluster
++# Required-Stop:	$network pve-cluster
+ # Default-Start:
+ # Default-Stop:
+ # Short-Description:	mount/unmount gfs2 filesystems configured in /etc/fstab
+@@ -72,7 +72,7 @@ GFS2MTAB=$(LC_ALL=C awk '!/^#/ && $3 == "gfs2" && $2 != "/" { print $2 }' /proc/
+ 
+ if [ -z "$GFS2FSTAB" ]; then
+ 	echo "GFS2: no entries found in /etc/fstab"
+-	exit 6
++	exit 0
+ fi
+ 
+ # See how we were called.
+diff --git a/gfs2/scripts/gfs2_lockcapture b/gfs2/scripts/gfs2_lockcapture
+index 8839818..699b2f6 100644
+--- a/gfs2/scripts/gfs2_lockcapture
++++ b/gfs2/scripts/gfs2_lockcapture
+@@ -875,7 +875,7 @@ def gatherOptionalDiagnosticData(pathToDSTDir):
+         except IOError:
+             message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
+             logging.getLogger(MAIN_LOGGER_NAME).error(message)
+-    elif (runCommand("which", ["corosync-cmapctl"])):
++    elif (runCommand("which", ["corosync-quorumtool"])):
+         command = "corosync-quorumtool"
+         pathToCommandOutput = os.path.join(pathToDSTDir, "corosync-quorumtool_l")
+         try:
+-- 
+1.7.10.4
+
diff --git a/debian/patches/fix-gfs-init.d-scripts.patch b/debian/patches/fix-gfs-init.d-scripts.patch
deleted file mode 100644
index b025bf1..0000000
--- a/debian/patches/fix-gfs-init.d-scripts.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: new/gfs2/init.d/gfs2-cluster
-===================================================================
---- new.orig/gfs2/init.d/gfs2-cluster	2012-02-17 09:01:54.000000000 +0100
-+++ new/gfs2/init.d/gfs2-cluster	2012-02-17 10:09:57.000000000 +0100
-@@ -19,27 +19,28 @@
- # Description: Starts and stops gfs_controld for dlm based GFS2 filesystems
- ### END INIT INFO
- 
--. /etc/rc.d/init.d/functions
-+. /lib/lsb/init-functions
- 
- prog="gfs_controld"
--lockfile="/var/lock/subsys/$prog"
-+lockfile="/var/lock/$prog"
- exec="/usr/sbin/$prog"
-+DESC="GFS2 Control Daemon"
- 
- start() {
- 	[ -x $exec ] || exit 5
--	echo -n $"Starting $prog: "
--	daemon $prog
-+	log_daemon_msg "Starting $DESC" "$prog"
-+	start_daemon $exec
- 	retval=$?
--	echo
-+	log_end_msg $retval
- 	[ $retval -eq 0 ] && touch $lockfile
- 	return $retval
- }
- 
- stop() {
--	echo -n $"Stopping $prog: "
-+	log_daemon_msg "Stopping $DESC" "$prog"
- 	killproc $prog
- 	retval=$?
--	echo
-+	log_end_msg $retval
- 	[ $retval -eq 0 ] && rm -f $lockfile
- }
- 
-@@ -53,7 +54,7 @@
- }
- 
- rh_status() {
--	status $prog
-+        status_of_proc $exec $prog
- }
- 
- rh_status_q() {
-@@ -87,7 +88,7 @@
- 		restart
- 		;;
- 	*)
--		echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
-+		echo "Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- 		exit 2
- esac
- exit $?
diff --git a/debian/patches/series b/debian/patches/series
index d895426..ff85cd9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-fix-gfs-init.d-scripts.patch
+0001-Ported-to-pve-cluster.patch
-- 
1.7.10.4




More information about the pve-devel mailing list