FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 02-01-2011, 08:13 PM
Chris Feist
 
Default cman: Minor fixes for checkquorum script

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!
");
+ debug("Quorum has already existed, node can be rebooted!
");
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).
");
@@ -45,16 +45,16 @@ if (!quorum()) {
close (FILE);
}
} else {
- debug("This is a new startup no self-fencing will occur.
");
+ debug("This is a new startup no reboot will occur.
");
`rm -f $timerfile`;
}
} else {
- debug("Quorum exists, no self-fencing should occur.
");
+ debug("Quorum exists, no reboot should occur.
");
`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|Coul d not initialize objdb library|Cannot connect to quorum service" `;
+ $oe = `corosync-objctl 2>&1 | grep -E "runtime.totem.pg.mrp.srp.operational_entered|Coul d not initialize objdb library|Cannot connect to quorum service" `;
if ($oe =~ /^Could not/ || $oe =~ /^Cannot/) {
debug("corosync is not running
");
exit 0;
@@ -79,8 +79,8 @@ sub quorum {
return 0;
}

-sub self_fence {
- debug("Self fencing commencing...
");
+sub reboot {
+ debug("Reboot commencing...
");
`rm -f $timerfile`;
if ($hardreboot == 1) {
`echo 1 > /proc/sys/kernel/sysrq`;
diff --git a/make/uninstall.mk b/make/uninstall.mk
index 8440187..01e8d2d 100644
--- a/make/uninstall.mk
+++ b/make/uninstall.mk
@@ -38,6 +38,9 @@ endif
ifdef PKGCONF
${UNINSTALL} ${PKGCONF} ${pkgconfigdir}
endif
+ifdef SHAREDIRTEX
+ ${UNINSTALL} ${SHAREDIRTEX} ${sharedir}
+endif
ifdef SHAREDIRT
${UNINSTALL} ${SHAREDIRT} ${sharedir}
endif
 

Thread Tools




All times are GMT. The time now is 03:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org