[SCM] CTDB repository - branch 1.2 updated - ctdb-1.0.114-380-ge31fde8
Ronnie Sahlberg
sahlberg at samba.org
Sun Oct 17 22:58:25 MDT 2010
The branch, 1.2 has been updated
via e31fde87b9ac43637f5e8e651385f1234bd4732f (commit)
via 7e2da57a41476a00edd1effcacddc6194e3d7e39 (commit)
via 0d7cde1ccade8a97d3c2e108788b6a33e0206550 (commit)
via 3f9c65cf6bf81dc8786c19745d824547dca5a5cf (commit)
from d45e25101a40cf092cb14dbaf8160fafc8119244 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2
- Log -----------------------------------------------------------------
commit e31fde87b9ac43637f5e8e651385f1234bd4732f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Mon Oct 18 15:58:03 2010 +1100
New version 1.2.7
- Dont monitor GPFS filesystems in 62.cnfs
- If tdb_open() fails, print errno to make troubleshooting easier
- Try restarting RPC.LOCKD if it failed to start
- Remove a dbug message
- Make sure the statd state directory exists before trying to touch files in
commit 7e2da57a41476a00edd1effcacddc6194e3d7e39
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Mon Oct 18 11:57:38 2010 +1100
remove checking for filesystems and filesystem health from the cnfs script.
remove the gpfsmount and gpfsumount entry points
commit 0d7cde1ccade8a97d3c2e108788b6a33e0206550
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Oct 14 09:49:23 2010 +1100
If tdb_open() fails when trying to open the vacuuming database,
print errno so we get some idea of why this failed.
commit 3f9c65cf6bf81dc8786c19745d824547dca5a5cf
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Oct 14 08:12:41 2010 +1100
try to restart NFS LOCKD if it failed to start
-----------------------------------------------------------------------
Summary of changes:
config/events.d/60.nfs | 7 +++-
config/events.d/62.cnfs | 74 --------------------------------------------
config/functions | 8 +++++
packaging/RPM/ctdb.spec.in | 8 ++++-
server/ctdb_vacuum.c | 2 +-
5 files changed, 22 insertions(+), 77 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index cd5219a..ed96ab8 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -79,7 +79,12 @@ case "$1" in
} || exit $?
# check that lockd responds to rpc requests
- ctdb_check_rpc "lockd" 100021 1
+ (ctdb_check_rpc "lockd" 100021 1)
+ [ $? = "0" ] || {
+ echo "Trying to restart lock manager service"
+ startstop_nfslock restart
+ exit 1
+ }
# mount needs special handling since it is sometimes not started
# correctly on RHEL5
diff --git a/config/events.d/62.cnfs b/config/events.d/62.cnfs
index e0af722..af4ecc3 100755
--- a/config/events.d/62.cnfs
+++ b/config/events.d/62.cnfs
@@ -8,20 +8,8 @@ loadconfig
STATEDIR=$CTDB_VARDIR/state/gpfs
-# filesystems needed by nfs
-NFS_FSS=`cat /etc/exports | egrep -v "^#" | sed -e "s/[ \t]*[^ \t]*$//" -e "s/\"//g"`
-
-
-
check_if_healthy() {
mkdir -p $STATEDIR/fs
- FS=`(cd $STATEDIR/fs ; ls )`
- [ -z "$FS" ] || {
- MISSING=`echo $FS | sed -e "s/@/\//g"`
- logger Filesystems required for NFS are missing. Node is UNHEALTHY. [$MISSING]
- $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS filesystems required for NFS are not mounted : [$MISSING]"
- exit 0
- }
[ -f "$STATEDIR/gpfsnoquorum" ] && {
logger No GPFS quorum. Node is UNHEALTHY
@@ -40,64 +28,6 @@ case "$1" in
;;
- # This event is called from the GPFS callbacks when a filesystem is
- # unmounted
- gpfsumount)
- # is this a filesystem we need for nfs?
- echo "$NFS_FSS" | egrep "^$2" >/dev/null || {
- # no
- exit 0
- }
-
- logger "GPFS unmounted filesystem $2 used by NFS. Mark node as UNHEALTHY"
-
- MFS=`echo $2 | sed -e "s/\//@/g"`
- mkdir -p $STATEDIR/fs
- touch "$STATEDIR/fs/$MFS"
- $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS unmounted filesystem $2 used by NFS"
- ;;
-
- # This event is called from the GPFS callbacks when a filesystem is
- # mounted
- gpfsmount)
- # is this a filesystem we need for nfs?
- echo "$NFS_FSS" | egrep "^$2" >/dev/null || {
- # no
- exit 0
- }
-
- logger "GPFS mounted filesystem $2 used by NFS."
-
- MFS=`echo $2 | sed -e "s/\//@/g"`
- mkdir -p $STATEDIR/fs
- rm -f "$STATEDIR/fs/$MFS"
-
- check_if_healthy
- ;;
-
-
-
- # This event is called from the gpfs callback when GPFS is being shutdown.
- gpfsshutdown)
- logger "GPFS is shutting down. Marking node as UNHEALTHY and trigger a CTDB failover"
- $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS was shut down!"
- ;;
-
-
- # This event is called from the gpfs callback when GPFS has started.
- # It checks that all required NFS filesystems are mounted
- # and flags the node healthy if so.
- gpfsstartup)
- # assume we always have quorum when starting
- # we are only interested in the case when we explicitely
- # lost quorum in an otherwise happy cluster
- mkdir -p $STATEDIR
- rm -f "$STATEDIR/gpfsnoquorum"
- logger "GPFS is is started."
- check_if_healthy
- ;;
-
-
gpfsquorumreached)
mkdir -p $STATEDIR
rm -f "$STATEDIR/gpfsnoquorum"
@@ -112,10 +42,6 @@ case "$1" in
$CTDB_BASE/events.d/62.cnfs unhealthy "GPFS quorum was lost! Marking node as UNHEALTHY."
;;
-
-
-
-
unhealthy)
# Mark the node as UNHEALTHY which means all public addresses
# will be migrated off the node.
diff --git a/config/functions b/config/functions
index 9771905..9659d48 100755
--- a/config/functions
+++ b/config/functions
@@ -417,6 +417,10 @@ startstop_nfslock() {
stop)
service nfsserver stop > /dev/null 2>&1
;;
+ restart)
+ service nfsserver stop
+ service nfsserver start
+ ;;
esac
;;
rhel)
@@ -427,6 +431,10 @@ startstop_nfslock() {
stop)
service nfslock stop > /dev/null 2>&1
;;
+ restart)
+ service nfslock stop
+ service nfslock start
+ ;;
esac
;;
*)
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index d7d40a4..852df0f 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
Summary: Clustered TDB
Vendor: Samba Team
Packager: Samba Team <samba at samba.org>
-Version: 1.2.6
+Version: 1.2.7
Release: 1GITHASH
Epoch: 0
License: GNU GPL version 3
@@ -142,6 +142,12 @@ development libraries for ctdb
%{_libdir}/libctdb.a
%changelog
+* Mon Oct 18 2010 : Version 1.2.7
+ - Dont monitor GPFS filesystems in 62.cnfs
+ - If tdb_open() fails, print errno to make troubleshooting easier
+ - Try restarting RPC.LOCKD if it failed to start
+ - Remove a dbug message
+ - Make sure the statd state directory exists before trying to touch files in it.
* Tue Oct 12 2010 : Version 1.2.6
- Move config.tdb handling into a function in 00.ctdb
- Latency counters min/max/avg for all latency statistics
diff --git a/server/ctdb_vacuum.c b/server/ctdb_vacuum.c
index b0c7d40..4104853 100644
--- a/server/ctdb_vacuum.c
+++ b/server/ctdb_vacuum.c
@@ -702,7 +702,7 @@ static int get_vacuum_interval(struct ctdb_db_context *ctdb_db)
flags,
O_RDWR|O_CREAT, 0600);
if (!tdb) {
- DEBUG(DEBUG_ERR,("Unable to open/create database %s using default interval\n", vac_dbname));
+ DEBUG(DEBUG_ERR,("Unable to open/create database %s using default interval. Errno : %s (%d)\n", vac_dbname, strerror(errno), errno));
talloc_free(tmp_ctx);
return interval;
}
--
CTDB repository
More information about the samba-cvs
mailing list