summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2008-11-21 22:27:54 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2008-11-21 22:27:54 +0000
commit47dd0d0111493390f3eb3bc9da9938c04fd8a13a (patch)
treecf01fee8399fcbcaa1df66f38aef3c4a6076f1bf /sys-cluster/cman
parentBlock against dev-util/rej. Closes #247434. (diff)
downloadgentoo-2-47dd0d0111493390f3eb3bc9da9938c04fd8a13a.tar.gz
gentoo-2-47dd0d0111493390f3eb3bc9da9938c04fd8a13a.tar.bz2
gentoo-2-47dd0d0111493390f3eb3bc9da9938c04fd8a13a.zip
Fixed homepage, ebuild cleanup, new cman init, fixed path in qdiskd, added patch for RH bug #457107.
(Portage version: 2.1.4.4)
Diffstat (limited to 'sys-cluster/cman')
-rw-r--r--sys-cluster/cman/ChangeLog8
-rw-r--r--sys-cluster/cman/cman-2.03.09.ebuild11
-rw-r--r--sys-cluster/cman/files/cman-2.02.39-bug457107.patch12
-rwxr-xr-xsys-cluster/cman/files/cman-2.0x.rc111
-rwxr-xr-xsys-cluster/cman/files/qdiskd-2.0x.rc4
5 files changed, 92 insertions, 54 deletions
diff --git a/sys-cluster/cman/ChangeLog b/sys-cluster/cman/ChangeLog
index 9eed9e4ea0a3..a98fc9e81ec8 100644
--- a/sys-cluster/cman/ChangeLog
+++ b/sys-cluster/cman/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-cluster/cman
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.41 2008/11/13 18:56:17 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.42 2008/11/21 22:27:54 xmerlin Exp $
+
+ 21 Nov 2008; Christian Zoffoli <xmerlin@gentoo.org> files/cman-2.0x.rc,
+ files/qdiskd-2.0x.rc, +files/cman-2.02.39-bug457107.patch,
+ cman-2.03.09.ebuild:
+ Fixed homepage, ebuild cleanup, new cman init, fixed path in qdiskd, added
+ patch for RH bug #457107.
*cman-2.03.09 (13 Nov 2008)
diff --git a/sys-cluster/cman/cman-2.03.09.ebuild b/sys-cluster/cman/cman-2.03.09.ebuild
index 4cca0cfa7565..bca62b3383b7 100644
--- a/sys-cluster/cman/cman-2.03.09.ebuild
+++ b/sys-cluster/cman/cman-2.03.09.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-2.03.09.ebuild,v 1.1 2008/11/13 18:56:17 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-2.03.09.ebuild,v 1.2 2008/11/21 22:27:54 xmerlin Exp $
inherit eutils versionator
@@ -11,7 +11,7 @@ MAJ_PV="$(get_major_version)"
MIN_PV="$(get_version_component_range 2).$(get_version_component_range 3)"
DESCRIPTION="general-purpose symmetric cluster manager"
-HOMEPAGE="http://sources.redhat.com/cluster/"
+HOMEPAGE="http://sources.redhat.com/cluster/wiki/"
SRC_URI="ftp://sources.redhat.com/pub/cluster/releases/${MY_P}.tar.gz"
LICENSE="GPL-2"
@@ -41,6 +41,8 @@ src_unpack() {
unpack ${A}
cd "${S}"
+ epatch "${FILESDIR}"/cman-2.02.39-bug457107.patch || die
+
# fix the manual pages have executable bit
sed -i -e '
/\tinstall -d/s/install/& -m 0755/; t
@@ -91,9 +93,4 @@ pkg_postinst() {
einfo ""
einfo "Please add a cluster.conf in /etc/cluster/"
einfo ""
- einfo "If you want to use cman and dlm 2.xx.xx"
- einfo "with 2.6.20 kernels you have to patch your"
- einfo "kernel sources with:"
- einfo "http://dev.gentoo.org/~xmerlin/gfs/dlm-gfs-2.6.20.patch.bz2"
- einfo ""
}
diff --git a/sys-cluster/cman/files/cman-2.02.39-bug457107.patch b/sys-cluster/cman/files/cman-2.02.39-bug457107.patch
new file mode 100644
index 000000000000..40a4159a16a3
--- /dev/null
+++ b/sys-cluster/cman/files/cman-2.02.39-bug457107.patch
@@ -0,0 +1,12 @@
+--- cluster-2.03.09/cman/daemon/commands.c.orig 2008-11-18 14:59:52.000000000 +0100
++++ cluster-2.03.09/cman/daemon/commands.c 2008-11-18 15:00:27.000000000 +0100
+@@ -1729,8 +1729,7 @@
+
+ /* Newer nodes 6.1.0 onwards, set the DIRTY flag if they have state. If the new node has been down
+ and has state then we mark it disallowed because we cannot merge stateful nodes */
+- if ( (msg->flags & NODE_FLAGS_DIRTY && (node->flags & NODE_FLAGS_BEENDOWN)) ||
+- (msg->flags & NODE_FLAGS_DIRTY && msg->first_trans && !node->us)) {
++ if ( msg->flags & NODE_FLAGS_DIRTY && (node->flags & NODE_FLAGS_BEENDOWN)) {
+ /* Don't duplicate messages */
+ if (node->state != NODESTATE_AISONLY) {
+ if (cluster_is_quorate) {
diff --git a/sys-cluster/cman/files/cman-2.0x.rc b/sys-cluster/cman/files/cman-2.0x.rc
index 2980850e511d..3cda35c4546c 100755
--- a/sys-cluster/cman/files/cman-2.0x.rc
+++ b/sys-cluster/cman/files/cman-2.0x.rc
@@ -1,15 +1,22 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman-2.0x.rc,v 1.2 2008/03/22 22:59:25 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman-2.0x.rc,v 1.3 2008/11/21 22:27:54 xmerlin Exp $
-CCSD_BIN="/usr/sbin/ccsd"
+CMAN_TOOL="/usr/sbin/cman_tool"
+FENCE_TOOL="/usr/sbin/fence_tool"
+GFS_CONTROLD="/usr/sbin/gfs_controld"
+DLM_CONTROLD="/usr/sbin/dlm_controld"
+GROUPD="/usr/sbin/groupd"
+FENCED="/usr/sbin/fenced"
+CCSD="/usr/sbin/ccsd"
[ -z "$CCSD_OPTS" ] && CCSD_OPTS=""
[ -z "$CMAN_CLUSTER_TIMEOUT" ] && CMAN_CLUSTER_TIMEOUT=120
[ -z "$CMAN_QUORUM_TIMEOUT" ] && CMAN_QUORUM_TIMEOUT=0
[ -z "$CMAN_SHUTDOWN_TIMEOUT" ] && CMAN_SHUTDOWN_TIMEOUT=60
[ -z "$FENCED_START_TIMEOUT" ] && FENCED_START_TIMEOUT=300
+[ -z "$FENCED_MEMBER_DELAY" ] && FENCED_MEMBER_DELAY=300
depend() {
use net
@@ -84,12 +91,12 @@ umount_configfs() {
eend $?
done
- local module=$(awk '$1 == "configfs" { print $1 }' /proc/modules)
+ local module=$(awk '$1 == "configfs" { print $1 }' /proc/modules)
- if [ ! -z "${module}" ]; then
- unload_modules "configfs"
- sleep 1s
- fi
+ if [ ! -z "${module}" ]; then
+ unload_modules "configfs"
+ sleep 1s
+ fi
}
umount_gfs_filesystems() {
@@ -130,31 +137,34 @@ unload_allmodules() {
$1 == "lock_harness" || $1 == "gfs2" || \
$1 == "gfs" { print $1 }' /proc/modules)
+ #modules=$(awk '$1 == "lock_harness" || \
+ # $1 == "gfs" { print $1 }' /proc/modules)
+
unload_modules "${modules}"
}
start_ccsd() {
ebegin "Starting ccsd"
start-stop-daemon --start --quiet \
- --exec ${CCSD_BIN} -- ${CCSD_OPTS}
+ --exec ${CCSD} -- ${CCSD_OPTS}
eend $?
}
stop_ccsd() {
ebegin "Stopping ccsd"
start-stop-daemon --stop --quiet \
- -s 9 --exec ${CCSD_BIN}
+ -s 9 --exec ${CCSD}
eend $?
}
start_cman() {
- /usr/sbin/cman_tool status &> /dev/null
+ ${CMAN_TOOL} status &> /dev/null
if [ $? -ne 0 ]
then
ebegin "Starting cman"
- /usr/sbin/cman_tool -t ${CMAN_CLUSTER_TIMEOUT} \
- -w join ${CMAN_JOIN_OPTS} > /dev/null
+ ${CMAN_TOOL} -t ${CMAN_CLUSTER_TIMEOUT} \
+ -w join ${CMAN_JOIN_OPTS} &> /dev/null
if [ "$?" -ne 0 ]
then
@@ -166,7 +176,7 @@ start_cman() {
if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ]
then
ebegin "Waiting for quorum (${CMAN_QUORUM_TIMEOUT} secs)"
- /usr/sbin/cman_tool -t ${CMAN_QUORUM_TIMEOUT} -q wait
+ ${CMAN_TOOL} -t ${CMAN_QUORUM_TIMEOUT} -q wait
eend $?
fi
fi
@@ -176,16 +186,19 @@ start_cman() {
}
stop_cman() {
- ebegin "Stopping cman"
- local stat=0
- /usr/sbin/cman_tool status > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- retry=3
- stat=1
- while [ "${stat}" -eq 1 -a "${retry}" -gt 0 ]
- do
- /usr/sbin/cman_tool -w -t ${CMAN_SHUTDOWN_TIMEOUT} \
- leave ${CMAN_LEAVE_OPTS} > /dev/null
+ ebegin "Stopping cman"
+ local stat=0
+ ${CMAN_TOOL} status > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ retry=3
+ stat=1
+ while [ "${stat}" -eq 1 -a "${retry}" -gt 0 ]
+ do
+ #sleep 2
+ #${CMAN_TOOL} -w -t ${CMAN_SHUTDOWN_TIMEOUT} \
+ # leave remove ${CMAN_LEAVE_OPTS} > /dev/null
+ ${CMAN_TOOL} -w -t 60 \
+ leave remove ${CMAN_LEAVE_OPTS} &> /dev/null
stat=$?
retry=$((${retry} -1))
@@ -197,63 +210,73 @@ stop_cman() {
start_groupd() {
ebegin "Starting groupd"
- start-stop-daemon --start --exec /usr/sbin/groupd --name groupd
+ start-stop-daemon --start --exec ${GROUPD} --name groupd
eend $?
}
stop_groupd() {
ebegin "Stopping groupd"
- start-stop-daemon --stop --exec /usr/sbin/groupd --name groupd
+ start-stop-daemon --stop --exec ${GROUPD} --name groupd
eend $?
}
start_fenced() {
- ebegin "Starting fenced"
- start-stop-daemon --start --exec /usr/sbin/fenced --name fenced
- eend $?
+ ebegin "Starting fenced"
+ start-stop-daemon --start --exec ${FENCED} --name fenced
+ eend $?
- ebegin "Joining fence domain"
- /usr/sbin/fence_tool join ${FENCED_OPTS}> /dev/null 2>&1
- eend $?
+ ${CMAN_TOOL} status | grep Flags | grep 2node &> /dev/null
+ local errmsg=$?
+
+ ebegin "Joining fence domain"
+ if [ "${errmsg}" -ne 0 ]
+ then
+ ${FENCE_TOOL} -w -t $FENCED_START_TIMEOUT join &> /dev/null
+ [ $? -eq 0 ] && errmsg=$? || errmsg=1
+ else
+ ${FENCE_TOOL} -w -m $FENCED_MEMBER_DELAY join &> /dev/null
+ [ $? -eq 0 ] && errmsg=$? || errmsg=1
+ fi
+ eend $errmsg
}
stop_fenced() {
# fenced services
- local fence_status="$(cman_tool services | awk '$1 ~ /fence/ { print $3 }')"
+ local fence_status="$( ${CMAN_TOOL} services | awk '$1 ~ /fence/ { print $3 }')"
if [ -n "${fence_status}" ]; then
- if [ -x /usr/sbin/fence_tool ]; then
+ if [ -x ${FENCE_TOOL} ]; then
ebegin "Leaving fence domain"
- /usr/sbin/fence_tool leave > /dev/null 2>&1
+ ${FENCE_TOOL} leave > /dev/null 2>&1
eend $?
fi
fi
- ebegin "Stopping fenced"
- start-stop-daemon --stop --exec /usr/sbin/fenced --name fenced
- eend $?
+ #ebegin "Stopping fenced"
+ #start-stop-daemon --stop --exec ${FENCED} --name fenced
+ #eend $?
}
start_gfs_controld() {
ebegin "Starting gfs_controld"
- start-stop-daemon --start --exec /usr/sbin/gfs_controld --name gfs_controld
+ start-stop-daemon --start --exec ${GFS_CONTROLD} --name gfs_controld
eend $?
}
stop_gfs_controld() {
ebegin "Stopping gfs_controld"
- start-stop-daemon --stop --exec /usr/sbin/gfs_controld --name gfs_controld
+ start-stop-daemon --stop --exec ${GFS_CONTROLD} --name gfs_controld
eend $?
}
start_dlm_controld() {
ebegin "Starting dlm_controld"
- start-stop-daemon --start --exec /usr/sbin/dlm_controld --name dlm_controld
+ start-stop-daemon --start --exec ${DLM_CONTROLD} --name dlm_controld
eend $?
}
stop_dlm_controld() {
ebegin "Stopping dlm_controld"
- start-stop-daemon --stop --exec /usr/sbin/dlm_controld --name dlm_controld
+ start-stop-daemon --stop --exec ${DLM_CONTROLD} --name dlm_controld
eend $?
}
@@ -276,9 +299,9 @@ stop() {
stop_fenced
stop_cman
- stop_gfs_controld
- stop_dlm_controld
- stop_groupd
+ #stop_gfs_controld
+ #stop_dlm_controld
+ #stop_groupd
stop_ccsd
unload_allmodules
diff --git a/sys-cluster/cman/files/qdiskd-2.0x.rc b/sys-cluster/cman/files/qdiskd-2.0x.rc
index 4045862b75fb..add364549d20 100755
--- a/sys-cluster/cman/files/qdiskd-2.0x.rc
+++ b/sys-cluster/cman/files/qdiskd-2.0x.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/qdiskd-2.0x.rc,v 1.1 2008/03/17 16:47:11 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/qdiskd-2.0x.rc,v 1.2 2008/11/21 22:27:54 xmerlin Exp $
depend() {
use net
@@ -10,7 +10,7 @@ depend() {
start() {
ebegin "Starting the Quorum Disk Daemon"
- start-stop-daemon --start --quiet --exec /sbin/qdiskd -- -Q
+ start-stop-daemon --start --quiet --exec /usr/sbin/qdiskd -- -Q
eend $? "Failed to start qdiskd"
}