]> git.proxmox.com Git - gfs2-utils.git/blame - debian/patches/0001-Migrating-from-cman-to-corosync-tools.patch
gfs2-utils: Fixed patches for updated GFS2
[gfs2-utils.git] / debian / patches / 0001-Migrating-from-cman-to-corosync-tools.patch
CommitLineData
07b3727e
TL
1From 93dce585f94c6f3a3d8653762fab1f54d1809fca Mon Sep 17 00:00:00 2001
2From: Thomas Lamprecht <t.lamprecht@proxmox.com>
3Date: Thu, 23 Jul 2015 16:37:15 +0200
4Subject: [PATCH] Migrating from cman to corosync tools
5
6Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7---
8 gfs2/init.d/gfs2 | 6 +++---
9 gfs2/scripts/gfs2_lockcapture | 27 ++-------------------------
10 2 files changed, 5 insertions(+), 28 deletions(-)
11 mode change 100644 => 100755 gfs2/init.d/gfs2
12 mode change 100644 => 100755 gfs2/scripts/gfs2_lockcapture
13
14diff --git a/gfs2/init.d/gfs2 b/gfs2/init.d/gfs2
15old mode 100644
16new mode 100755
17index 467f37b..dd9ae2a
18--- a/gfs2/init.d/gfs2
19+++ b/gfs2/init.d/gfs2
20@@ -7,8 +7,8 @@
21
22 ### BEGIN INIT INFO
23 # Provides: gfs2
24-# Required-Start: $network cman gfs_controld
25-# Required-Stop: $network cman gfs_controld
26+# Required-Start: $network pve-cluster
27+# Required-Stop: $network pve-cluster
28 # Default-Start:
29 # Default-Stop:
30 # Short-Description: mount/unmount gfs2 filesystems configured in /etc/fstab
31@@ -72,7 +72,7 @@ GFS2MTAB=$(LC_ALL=C awk '!/^#/ && $3 == "gfs2" && $2 != "/" { print $2 }' /proc/
32
33 if [ -z "$GFS2FSTAB" ]; then
34 echo "GFS2: no entries found in /etc/fstab"
35- exit 6
36+ exit 0 # doesn't have to be an error
37 fi
38
39 # See how we were called.
40diff --git a/gfs2/scripts/gfs2_lockcapture b/gfs2/scripts/gfs2_lockcapture
41old mode 100644
42new mode 100755
43index 8839818..222693d
44--- a/gfs2/scripts/gfs2_lockcapture
45+++ b/gfs2/scripts/gfs2_lockcapture
46@@ -595,20 +595,7 @@ def getClusterNode(listOfGFS2Names):
47 clusterName = ""
48 clusternodeName = ""
49 clusternodeID = ""
50- if (runCommand("which", ["cman_tool"])):
51- stdout = runCommandOutput("cman_tool", ["status"])
52- if (not stdout == None):
53- stdoutSplit = stdout.split("\n")
54- clusterName = ""
55- clusternodeName = ""
56- for line in stdoutSplit:
57- if (line.startswith("Cluster Name:")):
58- clusterName = line.split("Cluster Name:")[1].strip().rstrip()
59- if (line.startswith("Node name: ")):
60- clusternodeName = line.split("Node name:")[1].strip().rstrip()
61- if (line.startswith("Node ID: ")):
62- clusternodeID = line.split("Node ID: ")[1].strip().rstrip()
63- elif (runCommand("which", ["corosync-cmapctl"])):
64+ if (runCommand("which", ["corosync-cmapctl"])):
65 # Another way to get the local cluster node is: $ crm_node -i; crm_node -l
66 # Get the name of the cluster.
67 stdout = runCommandOutput("corosync-cmapctl", ["-g", "totem.cluster_name"])
68@@ -865,17 +852,7 @@ def gatherOptionalDiagnosticData(pathToDSTDir):
69 logging.getLogger(MAIN_LOGGER_NAME).error(message)
70
71 # Write the status of all the nodes in the cluster out.
72- if (runCommand("which", ["cman_tool"])):
73- command = "cman_tool"
74- pathToCommandOutput = os.path.join(pathToDSTDir, "cman_tool_status")
75- try:
76- fout = open(pathToCommandOutput, "w")
77- runCommand(command, ["status"], standardOut=fout)
78- fout.close()
79- except IOError:
80- message = "There was an error the command output for %s to the file %s." %(command, pathToCommandOutput)
81- logging.getLogger(MAIN_LOGGER_NAME).error(message)
82- elif (runCommand("which", ["corosync-cmapctl"])):
83+ if (runCommand("which", ["corosync-quorumtool"])):
84 command = "corosync-quorumtool"
85 pathToCommandOutput = os.path.join(pathToDSTDir, "corosync-quorumtool_l")
86 try:
87--
882.1.4
89