cluster: RHEL6 - cman: Minor fixes for checkquorum script
Chris Feist
cfeist at fedoraproject.org
Wed Feb 2 22:05:20 UTC 2011
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f5e2f9078450566f543eb03d22cf9078af9a9c07
Commit: f5e2f9078450566f543eb03d22cf9078af9a9c07
Parent: bedaeebc12fac2e5568249357835f210174f4240
Author: Chris Feist <cfeist at redhat.com>
AuthorDate: Tue Feb 1 15:06:36 2011 -0600
Committer: Chris Feist <cfeist at redhat.com>
CommitterDate: Wed Feb 2 16:04:42 2011 -0600
cman: Minor fixes for checkquorum script
Remove all references to self-fencing
Removed absolute path the binaries in checkquorum
Added missing uninstall information for SHAREDIRTEX
---
cman/scripts/checkquorum | 14 +++++++-------
make/uninstall.mk | 3 +++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/cman/scripts/checkquorum b/cman/scripts/checkquorum
index 43cbc6d..61934cd 100755
--- a/cman/scripts/checkquorum
+++ b/cman/scripts/checkquorum
@@ -26,14 +26,14 @@ if (($#ARGV != -1) && ($ARGV[0] eq "repair")) {
if (!quorum()) {
if (has_quorum_already_been_formed()) {
- debug("Quorum has already existed, node can be self fenced!\n");
+ debug("Quorum has already existed, node can be rebooted!\n");
if (-e $timerfile) {
$tf = open (FILE, "$timerfile");
$time = <FILE>;
close (FILE);
$timediff = time() - $time;
if ($timediff >= $wait_time) {
- self_fence()
+ reboot()
} else {
$remaining = $wait_time - $timediff;
debug("Time has not exceeded wait time ($remaining seconds remaining).\n");
@@ -45,16 +45,16 @@ if (!quorum()) {
close (FILE);
}
} else {
- debug("This is a new startup no self-fencing will occur.\n");
+ debug("This is a new startup no reboot will occur.\n");
`rm -f $timerfile`;
}
} else {
- debug("Quorum exists, no self-fencing should occur.\n");
+ debug("Quorum exists, no reboot should occur.\n");
`rm -f $timerfile`;
}
sub has_quorum_already_been_formed {
- $oe = `/usr/sbin/corosync-objctl 2>&1 | grep -E "runtime.totem.pg.mrp.srp.operational_entered|Could not initialize objdb library|Cannot connect to quorum service" `;
+ $oe = `corosync-objctl 2>&1 | grep -E "runtime.totem.pg.mrp.srp.operational_entered|Could not initialize objdb library|Cannot connect to quorum service" `;
if ($oe =~ /^Could not/ || $oe =~ /^Cannot/) {
debug("corosync is not running\n");
exit 0;
@@ -79,8 +79,8 @@ sub quorum {
return 0;
}
-sub self_fence {
- debug("Self fencing commencing...\n");
+sub reboot {
+ debug("Reboot commencing...\n");
`rm -f $timerfile`;
if ($hardreboot == 1) {
`echo 1 > /proc/sys/kernel/sysrq`;
diff --git a/make/uninstall.mk b/make/uninstall.mk
index 786faca..bbf7edc 100644
--- a/make/uninstall.mk
+++ b/make/uninstall.mk
@@ -47,6 +47,9 @@ endif
ifdef PKGCONF
${UNINSTALL} ${PKGCONF} ${pkgconfigdir}
endif
+ifdef SHAREDIRTEX
+ ${UNINSTALL} ${SHAREDIRTEX} ${sharedir}
+endif
ifdef SHAREDIRT
${UNINSTALL} ${SHAREDIRT} ${sharedir}
endif
More information about the cluster-commits
mailing list