diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-12-11 22:16:19 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-12-11 22:16:19 +0000 |
commit | bd426c48a0e37c7c637c2c4d5d708194f96f02b6 (patch) | |
tree | 86efc9aaa40883a674a6d7f2eca072b0682da9ab | |
parent | 2.2.0_alpha148 version bump. This includes all of the fixes in 2.1.11.37. (diff) | |
download | historical-bd426c48a0e37c7c637c2c4d5d708194f96f02b6.tar.gz historical-bd426c48a0e37c7c637c2c4d5d708194f96f02b6.tar.bz2 historical-bd426c48a0e37c7c637c2c4d5d708194f96f02b6.zip |
Non-maintainer revbump with init.d sanity checks for configfs/dlm per stabilization bug #442512; also convert init.d to be POSIX-sh safe. Please note that configfs and DLM are required for cman.
Package-Manager: portage-2.2.0_alpha144/cvs/Linux x86_64
-rw-r--r-- | sys-cluster/cman/ChangeLog | 13 | ||||
-rw-r--r-- | sys-cluster/cman/Manifest | 26 | ||||
-rw-r--r-- | sys-cluster/cman/cman-3.1.5-r1.ebuild | 101 | ||||
-rw-r--r-- | sys-cluster/cman/files/cman.initd-3.1.5-r1 | 335 |
4 files changed, 455 insertions, 20 deletions
diff --git a/sys-cluster/cman/ChangeLog b/sys-cluster/cman/ChangeLog index 815c92912630..f3a61d7b2d09 100644 --- a/sys-cluster/cman/ChangeLog +++ b/sys-cluster/cman/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-cluster/cman -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.48 2011/10/18 20:54:50 jer Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/ChangeLog,v 1.49 2012/12/11 22:16:13 robbat2 Exp $ + +*cman-3.1.5-r1 (11 Dec 2012) + + 11 Dec 2012; Robin H. Johnson <robbat2@gentoo.org> +cman-3.1.5-r1.ebuild, + +files/cman.initd-3.1.5-r1: + Non-maintainer revbump with init.d sanity checks for configfs/dlm per + stabilization bug #442512; also convert init.d to be POSIX-sh safe. Please + note that configfs and DLM are required for cman. 18 Oct 2011; Jeroen Roovers <jer@gentoo.org> cman-3.1.5.ebuild: Marked ~hppa (bug #386951). @@ -10,4 +18,3 @@ 14 Sep 2011; Ultrabug <ultrabug@gentoo.org> +cman-3.1.5.ebuild, +files/cman.confd, +files/cman.initd, +files/qdiskd.initd, +metadata.xml: Initial import - diff --git a/sys-cluster/cman/Manifest b/sys-cluster/cman/Manifest index df65f9e3182b..0ec4d272458a 100644 --- a/sys-cluster/cman/Manifest +++ b/sys-cluster/cman/Manifest @@ -1,17 +1,9 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -AUX cman.confd 2797 RMD160 9c4bdb0b651e60f25a7338b9ddad4cd582d2cd92 SHA1 f811a83fb2f31882b787aa7d5b4adc61599e63b2 SHA256 45f89870420c0855ace5a27149db878bd592a2f48c35711b40d29f3b358a2bf5 -AUX cman.initd 7224 RMD160 4176e7c52948401f2ac0720168e1e0c2849893c0 SHA1 711d8aa9f004c32d05a742a961fadb787a3148d2 SHA256 c127d11d6f0655fbefe3de95ee3dac749081336fe93cb30b0cd975a0f1e0a0cd -AUX qdiskd.initd 578 RMD160 3991003801f00d308d98c2439b4dec8cce17182e SHA1 4a57cfccaa2fe22fe19475af4f539941024d9ca2 SHA256 a680d858226b878bef90f76b4d1b772a2bf2b98be643a8633979e990b2f213cf -DIST cluster-3.1.5.tar.gz 651449 RMD160 c12dbf38c3e24cbdac23dbfdce6cb96da5c722ff SHA1 884d153ad9545d8abd225744dff5a905e19a6702 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e -EBUILD cman-3.1.5.ebuild 2690 RMD160 e74dc662d699d5398c194cc8190c6ee9c8151775 SHA1 1ad14ac24324bb15c4285ae3e109252c5b704565 SHA256 9d861c07635ac8a61f277a6b52f50cbf1acd2344e266b6c57c94164f091b3b36 -MISC ChangeLog 487 RMD160 ec9cfd0462e0461d2f85ad19b17f3f2b067a8be2 SHA1 2caa02006b2b75c8be08553c2ec78d8a0ef7c90a SHA256 f650ca8db3b904eb775c6dbc1fe3d45f43be52c06bb481f1dbbe6e200ef46b3d -MISC metadata.xml 213 RMD160 fc077093095118d4cf22310d08cbcc299900b14a SHA1 3646d29f38650355153655668976c46381f77c05 SHA256 69aa7f6654842583718e3cc6d05b1e7c3be2ec10baa05e6c5d6bddb040dbea2f ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) - -iEYEARECAAYFAk6d558ACgkQVWmRsqeSphNcnwCfa6N96venPI47T1Sdj/+dLnh8 -ckcAn1663AKRYArrKYhixSzwcmCrx7HB -=TU+4 ------END PGP SIGNATURE----- +AUX cman.confd 2797 SHA256 45f89870420c0855ace5a27149db878bd592a2f48c35711b40d29f3b358a2bf5 SHA512 97cfe35230198091261ab3202c2c4eb2683f43ae311c07a6d34d9ae9c47c71c004ce615993ad25189ee536cbf2863fb721a57c520b439de2e70a7cd3d84ae3fe WHIRLPOOL cf34d8d3e7f2d6c1bfa367ab8f1c969e21e255febc9bbc7418be3662dd82264bd0fd64866db0885794c05bf2f1b52db7af97903ffbf79cb040422d85ca601ea3 +AUX cman.initd 7224 SHA256 c127d11d6f0655fbefe3de95ee3dac749081336fe93cb30b0cd975a0f1e0a0cd SHA512 3f55d0ac6a383edc0f0a9029b07372b7480e7df82d7a5a16f547527bfad54823d351100d687f8788bee70676f989ae41b81715699978126c42fe9866f1116e2a WHIRLPOOL a065384385bd9ba00273d07e6bb882184387669f2e7a59b3e98a7aed80277f71870ab2b05fc91694ece15d6f2d6f871718acd7397d273bbb667aaab9f221a147 +AUX cman.initd-3.1.5-r1 7686 SHA256 0a4cecf91fbf66542aafe4bc51a773763185aa6e0744b0a819c183303529acc6 SHA512 19f21651875540b02f1823abac24a605effe70681e08cb8653b77fe47dfca6f0bd082e73545399e3d76ffcf143b894a63d1bc969b1a9a4a67b411083e572456a WHIRLPOOL 0fef899eb1a37251651b0eebb3c12a087a631f1d9a7a91e89c5334c7276a3eb60649bba80f62b757d10bb6fdda863cea74fb493d2b1694fe47f134095c9c9580 +AUX qdiskd.initd 578 SHA256 a680d858226b878bef90f76b4d1b772a2bf2b98be643a8633979e990b2f213cf SHA512 dacf2e4d96299b31f249276261885bc188755f9cebd186a39f67e4096486437cce05f16523b745a9875b71ad6111eceb979baf91261ea0be89746669a23adae8 WHIRLPOOL cad1b8a771193efb6b1de9b6fc1e96b4d44755fcf4f80e67a1854fb4701e9ea487005264804c0304d8736765414fce46640910854906ac0739d11b9c7921b5d5 +DIST cluster-3.1.5.tar.gz 651449 SHA256 95be1b484f9c58af3c47a9d46dc2802d37f1b2b9028053f243a2c8bd1f07623e +EBUILD cman-3.1.5-r1.ebuild 2706 SHA256 5acce6276b2ced0afc387e022f722c594d0423cfbcb3e43b598adffde07f2af1 SHA512 d0c500d992ad1cd7f9e70652e96955c11504624c4639725054a862ab2c6cba704a5e33dece2ea1e98e19e6740c2e9e070d4f278573f801e5de252446cc1367ff WHIRLPOOL 60376b4ab7b091548ada906a486b653ac4cfdee28add8bf3ecace6c48e65b02acbd0d4ddf9bd8e5c217e0c6e8cc60b0aa9a4496532e9a9d638aa5c26157e2846 +EBUILD cman-3.1.5.ebuild 2690 SHA256 9d861c07635ac8a61f277a6b52f50cbf1acd2344e266b6c57c94164f091b3b36 SHA512 2412e9a4705ab56de3d104192fd2b5b798a85590abb1168b239a8dcd8e1e534125d9c1b7674d791dd832077d0e3dd529c7410fe194b1aa3a8caa2c4a141e1112 WHIRLPOOL 98183ed3a6c9a2606b5f9b94aff695ba1d94e7c2f87d3143c51430ff1462fc4f2f3545ce48f43acf0b4473e2784b8252f96cf018e7bdf13f1c9fdb7e5da17a60 +MISC ChangeLog 828 SHA256 3731bb2efb802641e92def23df7190204946c29285064d0476f7371386e9783a SHA512 2e143664ec6cab0a0a58c865b4dd15c057f336c97e8f1333cba8dff4f1a2badaf4b4578f2bd565f7cdd1597d974768dc8a3975b6b5f6c08cc1e369757c71da7b WHIRLPOOL 6c0a761768ef9833a66d7af9e1a8a49bbb02db9991827a48fda70cc933c75af40704d9b17ce39b07763af61a21d67458811bf2c97d93eaf4f2e44c01fef5fe8e +MISC metadata.xml 213 SHA256 69aa7f6654842583718e3cc6d05b1e7c3be2ec10baa05e6c5d6bddb040dbea2f SHA512 d8428d1102d2cc160c6a6b52f723276631c27285afb662c698c1f782c307bc1fdb722327eb252b1b42835990a964acb066f1b87243679eb506021de71ab002aa WHIRLPOOL 8abb0a6d9b1c5403a1a2a0d15d0bcec2ddae928a9dad65669a698420e5618014b678a33e96375d3981130c722d6a1165a91aa385b5b85bae97be1cd4458b7fa9 diff --git a/sys-cluster/cman/cman-3.1.5-r1.ebuild b/sys-cluster/cman/cman-3.1.5-r1.ebuild new file mode 100644 index 000000000000..dd9afe58e51a --- /dev/null +++ b/sys-cluster/cman/cman-3.1.5-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-3.1.5-r1.ebuild,v 1.1 2012/12/11 22:16:13 robbat2 Exp $ + +EAPI=4 + +inherit linux-info multilib toolchain-funcs versionator + +CLUSTER_RELEASE="${PV}" +MY_P="cluster-${CLUSTER_RELEASE}" + +MAJ_PV="$(get_major_version)" +MIN_PV="$(get_version_component_range 2-3)" + +DESCRIPTION="Cluster Manager" +HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage" +SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="dbus ldap" + +RDEPEND="dev-libs/libxml2 + dev-libs/libxslt + dbus? ( sys-apps/dbus ) + ldap? ( net-nds/openldap ) + sys-cluster/corosync + sys-cluster/openais + ~sys-cluster/libccs-${PV} + ~sys-cluster/libfence-${PV} + ~sys-cluster/libcman-${PV} + ~sys-cluster/libdlm-${PV} + ~sys-cluster/liblogthread-${PV} + !sys-cluster/dlm +" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-2.6.24" + +S="${WORKDIR}/${MY_P}" + +# TODO: +# * Gentoo'ise the init script + +src_configure() { + # cluster libs have their own separate packages + sed -i -e 's|lib||' "${S}/cman/Makefile" || die + sed -i -e 's|liblogthread||' "${S}/common/Makefile" || die + sed -i -e 's|libs||' "${S}/config/Makefile" || die + sed -i -e 's|libdlm libdlmcontrol||' "${S}/dlm/Makefile" || die + sed -i -e 's|libfence libfenced||' "${S}/fence/Makefile" || die + sed -i -e 's|fence/libfenced||' "${S}/Makefile" || die + + sed -i \ + -e 's|\(^all:.*\)depends |\1|' \ + config/tools/ccs_tool/Makefile \ + fence/fence{d,_node,_tool}/Makefile \ + cman/{cman_tool,daemon,tests,qdisk,notifyd}/Makefile \ + dlm/{tool,tests/usertest}/Makefile \ + || die "sed failed" + + if ! use ldap ; then + sed -i -e 's|ldap||' config/plugins/Makefile || die "sed failed" + fi + local myopts="" + use dbus || myopts="--disable_dbus" + ./configure \ + --cc=$(tc-getCC) \ + --cflags="-Wall" \ + --libdir=/usr/$(get_libdir) \ + --disable_kernel_check \ + --kernel_src=${KERNEL_DIR} \ + --somajor="$MAJ_PV" \ + --sominor="$MIN_PV" \ + --without_rgmanager \ + --without_bindings \ + ${myopts} \ + || die "configure problem" +} + +src_install() { + emake DESTDIR="${D}" install + + # we have to create it in the init.d script anyway + rmdir "${D}"/var/run/{cluster,} + + keepdir /var/{lib,log}/cluster + keepdir /etc/cluster/cman-notify.d + + rm -rf "${D}/usr/share/doc" + dodoc \ + doc/{usage.txt,cman_notify_template.sh} \ + config/plugins/ldap/*.ldif + dohtml doc/*.html + + # lib-specific man pages are provided by the corresponding packages + rm "${D}/usr/share/man/man3/libdlm.3" + + newinitd "${FILESDIR}/${PN}.initd-3.1.5-r1" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" +} diff --git a/sys-cluster/cman/files/cman.initd-3.1.5-r1 b/sys-cluster/cman/files/cman.initd-3.1.5-r1 new file mode 100644 index 000000000000..91fee3427eab --- /dev/null +++ b/sys-cluster/cman/files/cman.initd-3.1.5-r1 @@ -0,0 +1,335 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/files/cman.initd-3.1.5-r1,v 1.1 2012/12/11 22:16:13 robbat2 Exp $ + +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 + after xend + after xendomains + provide cman +} + +load_modules() { + local module modules + modules=$1 + + rcS=0 # catch the first error here + [ -f /proc/modules ] && for module in ${modules}; do + ebegin "Loading ${module} kernel module" + modprobe -q ${module} + rc=$? # error for this modprobe call + eend $rc "Failed to load ${module} kernel module" + [ $rc -ne 0 ] && rcS=$rc + done + return $rcS +} + +unload_modules() { + local module modules + modules=$1 + + [ -f /proc/modules ] && for module in ${modules}; do + ebegin "Unloading ${module} kernel module" + modprobe -r ${module} > /dev/null + eend $? "Failed to unload ${module} kernel module" + done +} + +check_configfs() { + awk '{ print $2 }' /proc/mounts | grep -sq "/sys/kernel/config" \ + && awk '{ print $3 }' /proc/mounts | grep -sq "configfs" + + if [ $? -ne 0 ]; then + ewarn "Please add the following line to /etc/fstab:" + ewarn "none configfs /sys/kernel/config defaults 0 0" + eend 1 "configfs not mounted at /sys/kernel/config" + fi +} + +mount_configfs() +{ + local module=$(awk '$2 == "configfs" { print $2 }' /proc/filesystems) + + if [ -z "${module}" ]; then + load_modules "configfs" + rc=$? + sleep 1s + [ $rc -ne 0 ] && return 1 + fi + + # configfs + awk '{ print $2 }' /proc/mounts | grep -sq "/sys/kernel/config" \ + && awk '{ print $3 }' /proc/mounts | grep -sq "configfs" + rc=$? + + if [ $rc -ne 0 ] + then + ebegin "Mounting ConfigFS" + /bin/mount -t configfs none /sys/kernel/config 2>&1 + rc=$? + eend $rc + fi + + return $rc +} + +umount_configfs() { + local sig retry + local entry entries + + entries="$(awk '$3 == "configfs" { print $2 }' /proc/mounts | sort -r)" + + for entry in $entries; do + ebegin "Unmounting ConfigFS" + umount $entry >/dev/null 2>&1 + eend $? + done + + local module=$(awk '$1 == "configfs" { print $1 }' /proc/modules) + + if [ ! -z "${module}" ]; then + unload_modules "configfs" + sleep 1s + fi +} + +umount_gfs_filesystems() { + local sig retry + local remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { print $2 }' /proc/mounts | sort -r)" + + if [ -n "${remaining}" ] + then + sig= + retry=3 + while [ -n "${remaining}" -a "${retry}" -gt 0 ] + do + if [ "${retry}" -lt 3 ] + then + ebegin "Unmounting GFS filesystems (retry)" + umount ${remaining} >/dev/null 2>&1 + eend $? "Failed to unmount GFS filesystems this retry" + else + ebegin "Unmounting GFS filesystems" + umount ${remaining} >/dev/null 2>&1 + eend $? "Failed to unmount GFS filesystems" + fi + remaining="$(awk '$3 == "gfs" || $3 == "gfs2" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)" + [ -z "${remaining}" ] && break + /bin/fuser -k -m ${sig} ${remaining} >/dev/null 2>&1 + sleep 5 + retry=$((${retry} -1)) + sig=-9 + done + fi +} + +unload_allmodules() { + local modules + + modules=$(awk '$1 == "lock_gulm" || \ + $1 == "lock_dlm" || $1 == "dlm" || \ + $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} -- ${CCSD_OPTS} + eend $? +} + +stop_ccsd() { + ebegin "Stopping ccsd" + start-stop-daemon --stop --quiet -s 9 --exec ${CCSD} + eend $? +} + +start_cman() { + ${CMAN_TOOL} status >/dev/null 2>&1 + if [ $? -ne 0 ] + then + ebegin "Starting cman" + ${CMAN_TOOL} -t ${CMAN_CLUSTER_TIMEOUT} \ + -w join ${CMAN_JOIN_OPTS} >/dev/null 2>&1 + + if [ "$?" -ne 0 ] + then + eend 1 "Failed to start cman" + else + eend 0 + + # make sure that we are quorate? + if [ ${CMAN_QUORUM_TIMEOUT} -gt 0 ] + then + ebegin "Waiting for quorum (${CMAN_QUORUM_TIMEOUT} secs)" + ${CMAN_TOOL} -t ${CMAN_QUORUM_TIMEOUT} -q wait + eend $? + fi + fi + else + einfo "cman already running" + fi +} + +stop_cman() { + 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} leave -t ${CMAN_SHUTDOWN_TIMEOUT} ${CMAN_LEAVE_OPTS} \ + remove >/dev/null 2>&1 + stat=$? + retry=$((${retry} -1)) + done + fi + eend ${stat} +} + +start_groupd() { + ebegin "Starting groupd" + start-stop-daemon --start --exec ${GROUPD} --name groupd + eend $? +} + +stop_groupd() { + ebegin "Stopping groupd" + start-stop-daemon --stop --exec ${GROUPD} --name groupd + eend $? +} + +start_fenced() { + ebegin "Starting fenced" + start-stop-daemon --start --exec ${FENCED} --name fenced + eend $? + + ${CMAN_TOOL} status | grep Flags | grep 2node >/dev/null 2>&1 + local errmsg=$? + + ebegin "Joining fence domain" + if [ "${errmsg}" -ne 0 ] + then + ${FENCE_TOOL} join -t $FENCED_START_TIMEOUT >/dev/null 2>&1 + [ $? -eq 0 ] && errmsg=$? || errmsg=1 + else + ${FENCE_TOOL} join -m $FENCED_MEMBER_DELAY >/dev/null 2>&1 + [ $? -eq 0 ] && errmsg=$? || errmsg=1 + fi + eend $errmsg +} + +stop_fenced() { + # fenced services +# local fence_status="$( ${CMAN_TOOL} services | awk '$1 ~ /fence/ { print $3 }')" +# if [ -n "${fence_status}" ]; then +# if [ -x ${FENCE_TOOL} ]; then +# ebegin "Leaving fence domain" +# ${FENCE_TOOL} leave > /dev/null 2>&1 +# eend $? +# fi +# fi + + if [ -x ${FENCE_TOOL} ]; then + if ${FENCE_TOOL} ls >/dev/null 2>&1; then + ebegin "Leaving fence domain" + ${FENCE_TOOL} leave > /dev/null 2>&1 + eend $? + fi + fi + + ebegin "Stopping fenced" + start-stop-daemon --stop --exec ${FENCED} --name fenced + eend $? +} + +start_gfs_controld() { + ebegin "Starting 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 ${GFS_CONTROLD} --name gfs_controld + eend $? +} + +start_dlm_controld() { + ebegin "Starting 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 ${DLM_CONTROLD} --name dlm_controld + eend $? +} + +start() { + if ! mount_configfs ; then + eerror "ConfigFS & DLM are required to use cman" + return 1 + fi + + [ -e /sys/module/dlm ] || [ -e /sys/kernel/dlm ] || load_modules "dlm" + if [ ! -e /sys/kernel/dlm ]; then + eerror "ConfigFS & DLM are required to use cman" + return 1 + fi + mkdir -p /var/run/cluster + +# start_ccsd + start_cman + start_fenced + start_groupd + start_dlm_controld +# start_gfs_controld +} + +stop() { + +# umount GFS filesystems +# umount_gfs_filesystems + + stop_dlm_controld + stop_groupd + stop_fenced + stop_cman + + #stop_gfs_controld + #stop_dlm_controld + #stop_groupd + + unload_modules "dlm" +# stop_ccsd +# unload_allmodules + umount_configfs +} |