From 59fd3bd564344c6302cdc22c9abfa10b66b0398e Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 8 Apr 2009 08:48:55 +1000 Subject: install /etc/ctdb/notify.sh as executable. this addresses bug 6250 (This used to be ctdb commit b8be5b06c3359d037db336dc12d38e0018349951) --- ctdb/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctdb/Makefile.in b/ctdb/Makefile.in index b67818f817..f1c596d4cc 100755 --- a/ctdb/Makefile.in +++ b/ctdb/Makefile.in @@ -223,7 +223,7 @@ install: all if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -m 644 doc/ctdb.1 $(DESTDIR)$(mandir)/man1; fi if [ -f doc/ctdbd.1 ];then ${INSTALLCMD} -m 644 doc/ctdbd.1 $(DESTDIR)$(mandir)/man1; fi if [ -f doc/onnode.1 ];then ${INSTALLCMD} -m 644 doc/onnode.1 $(DESTDIR)$(mandir)/man1; fi - if [ ! -f $(DESTDIR)$(etcdir)/ctdb/notify.sh ];then ${INSTALLCMD} -m 644 config/notify.sh $(DESTDIR)$(etcdir)/ctdb; fi + if [ ! -f $(DESTDIR)$(etcdir)/ctdb/notify.sh ];then ${INSTALLCMD} -m 755 config/notify.sh $(DESTDIR)$(etcdir)/ctdb; fi test: all tests/run_tests.sh -- cgit From 6efe2b65339c761c6088829a86bba42f6aba0923 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 8 Apr 2009 09:14:20 +1000 Subject: (This used to be ctdb commit b0718551f55d5da9be0e6aba233f57c1ff8509be) --- ctdb/ctdb.pc.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ctdb/ctdb.pc.in diff --git a/ctdb/ctdb.pc.in b/ctdb/ctdb.pc.in new file mode 100644 index 0000000000..5f5bfab23c --- /dev/null +++ b/ctdb/ctdb.pc.in @@ -0,0 +1,19 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +datarootdir=@datarootdir@ +includedir=@includedir@ +libdir=@libdir@ +bindir=@bindir@ +sbindir=@sbindir@ +mandir=@mandir@ +localstatedir=@localstatedir@ +srcdir=@srcdir@ +etcdir=@sysconfdir@ + +Name: ctdb +Description: A clustered database to store temporary data +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} +Cflags: -I${includedir} +URL: http://ctdb.samba.org/ + -- cgit From 0f70c47008deb274b61f36f7cfb9fcabcf6b405b Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 8 Apr 2009 09:21:11 +1000 Subject: From Mathieu Parent Install the pkgconfig file (This used to be ctdb commit 7c4389cc0baa43a0ffa9fb08944c253db7885807) --- ctdb/.gitignore | 1 + ctdb/Makefile.in | 4 +++- ctdb/autogen.sh | 2 +- ctdb/configure.ac | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ctdb/.gitignore b/ctdb/.gitignore index 826bc1a351..69d809385d 100644 --- a/ctdb/.gitignore +++ b/ctdb/.gitignore @@ -2,6 +2,7 @@ *~ config.status configure +ctdb.pc publish*.sh push*.sh web/packages diff --git a/ctdb/Makefile.in b/ctdb/Makefile.in index f1c596d4cc..f1c5f369ab 100755 --- a/ctdb/Makefile.in +++ b/ctdb/Makefile.in @@ -188,12 +188,14 @@ distclean: clean rm -f Makefile install: all + mkdir -p $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(bindir) mkdir -p $(DESTDIR)$(sbindir) mkdir -p $(DESTDIR)$(includedir) mkdir -p $(DESTDIR)$(etcdir)/ctdb mkdir -p $(DESTDIR)$(etcdir)/ctdb/events.d mkdir -p $(DESTDIR)$(docdir)/ctdb + ${INSTALLCMD} -m 644 ctdb.pc $(DESTDIR)$(libdir)/pkgconfig ${INSTALLCMD} -m 755 bin/ctdb $(DESTDIR)$(bindir) ${INSTALLCMD} -m 755 bin/ctdb_ipmux $(DESTDIR)$(bindir) ${INSTALLCMD} -m 755 bin/ctdbd $(DESTDIR)$(sbindir) @@ -233,4 +235,4 @@ valgrindtest: all realdistclean: distclean - rm -f configure config.h.in + rm -f configure config.h.in ctdb.pc diff --git a/ctdb/autogen.sh b/ctdb/autogen.sh index a361cd16e8..e3338987dc 100755 --- a/ctdb/autogen.sh +++ b/ctdb/autogen.sh @@ -1,7 +1,7 @@ #!/bin/sh rm -rf autom4te.cache -rm -f configure config.h.in +rm -f configure config.h.in ctdb.pc IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace" IPATHS="$IPATHS -I lib/talloc -I talloc -I ../talloc" diff --git a/ctdb/configure.ac b/ctdb/configure.ac index 8b6102da3a..b4d5ace500 100644 --- a/ctdb/configure.ac +++ b/ctdb/configure.ac @@ -84,4 +84,4 @@ AC_SUBST(CTDB_SYSTEM_OBJ) AC_SUBST(CTDB_SCSI_IO) AC_SUBST(CTDB_PCAP_LDFLAGS) -AC_OUTPUT(Makefile) +AC_OUTPUT(Makefile ctdb.pc) -- cgit From 62afe2ff71b3d41eb6ad308e4dc26d4551125127 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 8 Apr 2009 09:34:20 +1000 Subject: install ctdb.pc from the RPM (This used to be ctdb commit 1b47ddc97373376b416a50939b74dc8c926fc917) --- ctdb/packaging/RPM/ctdb.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/packaging/RPM/ctdb.spec b/ctdb/packaging/RPM/ctdb.spec index 7422150765..3bedcc686f 100644 --- a/ctdb/packaging/RPM/ctdb.spec +++ b/ctdb/packaging/RPM/ctdb.spec @@ -128,6 +128,7 @@ fi %{_mandir}/man1/onnode.1.gz %{_includedir}/ctdb.h %{_includedir}/ctdb_private.h +%{_libdir}/pkgconfig/ctdb.pc %changelog * Tue Mar 31 2009 : Version 1.0.78 -- cgit From 976e76f408cae59632082fa5ab520bf759a833dd Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 8 Apr 2009 10:45:00 +1000 Subject: set libdir to ../lib64 on x86-64 platforms (This used to be ctdb commit a9f851caec2525ccbb3a6d6283eaef52b89a4eb2) --- ctdb/configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ctdb/configure.ac b/ctdb/configure.ac index b4d5ace500..a7bd2bb8d4 100644 --- a/ctdb/configure.ac +++ b/ctdb/configure.ac @@ -14,6 +14,15 @@ AC_DEFUN([SMB_ENABLE], [echo -n ""]) AC_INIT(ctdb.h) AC_CONFIG_SRCDIR([server/ctdbd.c]) +case `uname -m` in + x86_64) + libdir='${exec_prefix}/lib64' + ;; + *) + libdir='${exec_prefix}/lib' + ;; +esac + case `uname` in Linux*) CTDB_SYSTEM_OBJ=common/system_linux.o -- cgit From 4be3e864050d394e4a2c15c331f16c6f039ff6a5 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 8 Apr 2009 12:49:28 +1000 Subject: create a function "remote_ip" which can be used from scripts to remove a single ip from an interface. use this fucntion from the natgw eventscript (This used to be ctdb commit feab5f30b2d6cebf4dd28abc5a81f93424a4c852) --- ctdb/config/events.d/11.natgw | 7 ++++--- ctdb/config/functions | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index 2d256ba81c..1e0543d048 100644 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -14,16 +14,17 @@ cmd="$1" shift PATH=/usr/bin:/bin:/usr/sbin:/sbin:$PATH + delete_all() { - ip addr add $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE >/dev/null 2>/dev/null - ip addr del $NATGW_PUBLIC_IP_HOST dev $NATGW_PRIVATE_IFACE >/dev/null 2>/dev/null + remove_ip $NATGW_PUBLIC_IP $NATGW_PUBLIC_IFACE + remove_ip $NATGW_PUBLIC_IP_HOST $NATGW_PRIVATE_IFACE + ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null # Delete the masquerading setup from a previous iteration where we # were the NAT-GW iptables -D POSTROUTING -t nat -s $NATGW_PRIVATE_NETWORK -d ! $NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null - ip addr del $NATGW_PUBLIC_IP dev $NATGW_PUBLIC_IFACE >/dev/null 2>/dev/null } case $cmd in diff --git a/ctdb/config/functions b/ctdb/config/functions index 2f0b01fe24..8b29fe4430 100644 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -437,6 +437,30 @@ startstop_nfslock() { esac } +######################################################## +# remove an ip address from an interface +######################################################## +remove_ip() { + # the ip tool will delete all secondary IPs if this is the primary. + # To work around this _very_ annoying behaviour we have to keep a + # record of the secondaries and re-add them afterwards. yuck + secondaries="" + if ip addr list dev $2 primary | grep -q "inet $1 " ; then + secondaries=`ip addr list dev $2 secondary | grep " inet " | awk '{print $2}'` + fi + ip addr del $1 dev $2 >/dev/null 2>/dev/null || failed=1 + [ -z "$secondaries" ] || { + for i in $secondaries; do + if ip addr list dev $2 | grep -q "inet $i" ; then + echo "kept secondary $i on dev $2" + else + echo "re-adding secondary address $i to dev $2" + ip addr add $i dev $2 || failed=1 + fi + done + } +} + ######################################################## # load a site local config file ######################################################## @@ -445,3 +469,4 @@ startstop_nfslock() { . $CTDB_BASE/rc.local } + -- cgit From 8752745173dea554c111bdbcbcd405de88bc9f01 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 8 Apr 2009 12:56:52 +1000 Subject: new version 1.0.79 (This used to be ctdb commit 6c900aa343096c5e1e297e055c36832ffa5028dd) --- ctdb/packaging/RPM/ctdb.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ctdb/packaging/RPM/ctdb.spec b/ctdb/packaging/RPM/ctdb.spec index 3bedcc686f..77bb0baeb5 100644 --- a/ctdb/packaging/RPM/ctdb.spec +++ b/ctdb/packaging/RPM/ctdb.spec @@ -4,7 +4,7 @@ Summary: Clustered TDB Vendor: Samba Team Packager: Samba Team Name: ctdb -Version: 1.0.78 +Version: 1.0.79 Release: 1 Epoch: 0 License: GNU GPL version 3 @@ -131,6 +131,14 @@ fi %{_libdir}/pkgconfig/ctdb.pc %changelog +* Wed Apr 8 2009 : Version 1.0.79 + - From Mathieu Parent: add a ctdb pkgconfig file + - Fix bug 6250 + - add a funciton remove_ip to safely remove an ip from an interface, taking care to workaround an issue with linux alias interfaces. + - Update the natgw eventscript to use the safe remove_ip() function + - fix a bug in the eventscript child process that would cause the socket to be removed. + - dont verify nodemap on banned nodes during cluster monitoring + - Update the dodgy SeqnumInterval to have ms resolution * Tue Mar 31 2009 : Version 1.0.78 - Add a notify mechanism so we can send snmptraps/email to external management systems when the node becomes unhealthy - include 11.natgw eventscript in thew install so that the NATGW feature works -- cgit