Rev 672: merge from ronnie in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Mon Oct 29 02:43:13 GMT 2007
------------------------------------------------------------
revno: 672
revision-id: tridge at samba.org-20071029024312-raaxbvb1gvmd22b0
parent: tridge at samba.org-20071026045309-uzmrlsu8b4tpyt66
parent: root at ronnie-20071029013445-nxx5r1xhnn10k397
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Mon 2007-10-29 13:43:12 +1100
message:
merge from ronnie
modified:
config/events.d/00.ctdb events-20070529030121-04fjh63cxfh8v1pj-1
config/events.d/10.interface 10.interface-20070604050809-s21zslfirn07zjt8-1
config/events.d/60.nfs nfs-20070601141008-hy3h4qgbk1jd2jci-1
------------------------------------------------------------
revno: 432.1.339
revision-id: root at ronnie-20071029013445-nxx5r1xhnn10k397
parent: sahlberg at ronnie-20071028235116-9naey2obb9w80vb4
committer: root <root at ronnie>
branch nick: ctdb
timestamp: Mon 2007-10-29 12:34:45 +1100
message:
the while loop in the startup event runs as a subshell so we need an extra || exit 1 at the end
to propagate the error code back to the caller of the script
modified:
config/events.d/00.ctdb events-20070529030121-04fjh63cxfh8v1pj-1
------------------------------------------------------------
revno: 432.1.338
revision-id: sahlberg at ronnie-20071028235116-9naey2obb9w80vb4
parent: sahlberg at ronnie-20071028215051-4a5l06le2vh8az0n
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Mon 2007-10-29 10:51:16 +1100
message:
if bond* interfaces are used as public interfaces we can not rely on ethtool but
have to check /proc for the status instead
modified:
config/events.d/10.interface 10.interface-20070604050809-s21zslfirn07zjt8-1
------------------------------------------------------------
revno: 432.1.337
revision-id: sahlberg at ronnie-20071028215051-4a5l06le2vh8az0n
parent: sahlberg at ronnie-20071028214046-42h7ra15q8216k03
parent: tridge at samba.org-20071026045309-uzmrlsu8b4tpyt66
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Mon 2007-10-29 08:50:51 +1100
message:
merge from tridge
modified:
config/events.d/40.vsftpd 40.vsftpd-20070605080716-mih15mjbgsjt7niv-1
------------------------------------------------------------
revno: 432.1.336
revision-id: sahlberg at ronnie-20071028214046-42h7ra15q8216k03
parent: sahlberg at ronnie-20071023023543-30gcr1h4xqgyf0dy
parent: tridge at samba.org-20071023015652-ocpxfasra7qtmlb7
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Mon 2007-10-29 08:40:46 +1100
message:
merge from tridge
modified:
packaging/RPM/ctdb.spec ctdb.spec-20070527204758-biuh7znabuwan3zn-3
------------------------------------------------------------
revno: 432.1.335
revision-id: sahlberg at ronnie-20071023023543-30gcr1h4xqgyf0dy
parent: sahlberg at ronnie-20071022204245-t2t9wklb1hjru3vg
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Tue 2007-10-23 12:35:43 +1000
message:
since service nfs stop/start sometimes fail to bring up the mount daemon on rhel5
check if mountd is running during monitoring and if it is not, try to restart it
modified:
config/events.d/60.nfs nfs-20070601141008-hy3h4qgbk1jd2jci-1
=== modified file 'config/events.d/00.ctdb'
--- a/config/events.d/00.ctdb 2007-09-14 04:14:03 +0000
+++ b/config/events.d/00.ctdb 2007-10-29 01:34:45 +0000
@@ -31,7 +31,7 @@
value=`echo $v | cut -d= -f2`
ctdb setvar $varname $value || exit 1
echo "`date` Set $varname to $value"
- done
+ done || exit 1
;;
esac
=== modified file 'config/events.d/10.interface'
--- a/config/events.d/10.interface 2007-10-10 21:27:38 +0000
+++ b/config/events.d/10.interface 2007-10-28 23:51:16 +0000
@@ -137,23 +137,29 @@
;;
monitor)
- [ -x /usr/sbin/ethtool ] && {
- [ -z "$CTDB_PUBLIC_INTERFACE" ] || {
- /usr/sbin/ethtool $CTDB_PUBLIC_INTERFACE | grep 'Link detected: yes' > /dev/null || {
- echo "`date` ERROR: No link on the public network interface $CTDB_PUBLIC_INTERFACE"
- exit 1
- }
- }
- cat $CTDB_PUBLIC_ADDRESSES | sed -e "s/^[^\t ]*[\t ]*//" -e "s/[\t ]*$//" |
- sort | uniq | while read IFACE; do
+ INTERFACES=`cat $CTDB_PUBLIC_ADDRESSES |
+ sed -e "s/^[^\t ]*[\t ]*//" -e "s/[\t ]*$//"`
+
+ [ "$CTDB_PUBLIC_INTERFACE" ] && INTERFACES="$CTDB_PUBLIC_INTERFACE $INTERFACES"
+
+ INTERFACES=`for IFACE in $INTERFACES ; do echo $IFACE ; done | sort | uniq`
+
+
+ for IFACE in $INTERFACES ; do
+ if [ `echo $IFACE | grep '^bond*'` ] ; then
+ grep '^MII Status: up' /proc/net/bonding/$IFACE > /dev/null || {
+ echo "`date` ERROR: public network interface $IFACE is down"
+ exit 1
+ }
+ else
[ -z "$IFACE" ] || {
/usr/sbin/ethtool $IFACE | grep 'Link detected: yes' > /dev/null || {
echo "`date` ERROR: No link on the public network interface $IFACE"
exit 1
}
}
- done
- }
+ fi
+ done
;;
esac
=== modified file 'config/events.d/60.nfs'
--- a/config/events.d/60.nfs 2007-10-22 05:14:49 +0000
+++ b/config/events.d/60.nfs 2007-10-23 02:35:43 +0000
@@ -67,7 +67,6 @@
monitor)
# check that NFS responds to rpc requests
ctdb_check_rpc "NFS" 100003 3
- ctdb_check_rpc "mount" 100005 1
# and that its directories are available
nfs_dirs=`grep -v '^#' < /etc/exports | cut -d' ' -f1`
@@ -77,6 +76,17 @@
ctdb_check_rpc "statd" 100024 1
ctdb_check_rpc "lockd" 100021 1
ctdb_check_directories "statd" $STATD_SHARED_DIRECTORY
+
+ # mount needs special handling since it is sometimes not started
+ # correctly on RHEL5
+ rpcinfo -u localhost 100005 1 > /dev/null || {
+ echo "`date` ERROR: MOUNTD is not running. Trying to restart it."
+ RPCMOUNTDOPTS=""
+ [ -n "$MOUNTD_PORT" ] && RPCMOUNTDOPTS="$RPCMOUNTDOPTS -p $MOUNTD_PORT"
+ killall -q -9 rpc.mountd
+ rpc.mountd $RPCMOUNTDOPTS &
+ exit 1
+ }
;;
esac
More information about the samba-cvs
mailing list